ShootSingleBulletBetweenCoords
DocsShootSingleBulletBetweenCoords(x1, y1, z1, x2, y2, z2, damage, pureAccuracy, weaponHash, ownerPed, isAudible, isInvisible, speed)Description
Shoots a bullet from the first vector to the second vector. The weapon used as weaponHash should already be loaded via REQUEST_WEAPON_ASSET, otherwise the bullet may fail to materialise.
Parameters
| Name | Type | Description |
|---|---|---|
x1 | float | The X coordinate to start the shot at. |
y1 | float | The Y coordinate to start the shot at. |
z1 | float | The Z coordinate to start the shot at. |
x2 | float | The X coordinate the shot should end up at. |
y2 | float | The Y coordinate the shot should end up at. |
z2 | float | The Z coordinate the shot should end up at. |
damage | int | The amount of damage the bullet carries. |
pureAccuracy | BOOL | Whether the bullet should have pinpoint accuracy. |
weaponHash | Hash | Hash of the weapon the bullet is used as ammunition for. |
ownerPed | Ped | Owner of the bullet, e.g. if the bullet kills someone the kill feed shows 'X was shot by ownerPed.' |
isAudible | BOOL | Whether the bullet should be audible. Optional, defaults to true |
isInvisible | BOOL | Whether the bullet should be invisible. Optional, defaults to false |
speed | float | Speed the bullet should fly at. Optional |
Quick Snippet: Get Coordinatesx1y1z1x2
x1y1z1x2Add this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Quick Snippet: Get Ped HandleownerPed
ownerPedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.