TaskGoToCoordWhileAimingAtCoord
DocsTaskGoToCoordWhileAimingAtCoord(ped, x, y, z, aimAtX, aimAtY, aimAtZ, moveSpeed, shoot, p9, p10, p11, flags, p13, firingPattern)Description
Will make the ped move to a coordinate while aiming (and optionally shooting) at given coordinates.
Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | Ped to task |
x | float | Destination X position |
y | float | Destination Y position |
z | float | Destination Z position |
aimAtX | float | Aim at target x position |
aimAtY | float | Aim at target Y position |
aimAtZ | float | Aim at target Z position |
moveSpeed | float | mostly 2f, but also 1/1.2f, etc. |
shoot | BOOL | If true ped will shoot; false - will not |
p9 | float | Usually 2.0f |
p10 | float | Usually 0.5f |
p11 | BOOL | If true ped will stay still; false - will not |
flags | Any | 0 / 512 / 513, etc |
p13 | BOOL | — |
firingPattern | Hash | ${firing_pattern_full_auto}, 0xC6EE6B4C |
Quick Snippet: Get Coordinatesxyz
xyzAdd 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 Handleped
pedUse 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.