RedM Natives

TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD

Hash0xA55547801EB331FC
Runtime nameTaskGoToCoordAndAimAtHatedEntitiesNearCoord
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xA55547801EB331FC

Signature

void TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(Ped ped, float goToLocationX, float goToLocationY, float goToLocationZ, float focusLocationX, float focusLocationY, float focusLocationZ, float speed, BOOL shootAtEnemies, float distanceToStopAt, float noRoadsDistance, BOOL unkTrue, int unkFlag, int aimingFlag, Hash firingPattern);

Parameters

NameTypeDescription
pedPed—
goToLocationXfloat—
goToLocationYfloat—
goToLocationZfloat—
focusLocationXfloat—
focusLocationYfloat—
focusLocationZfloat—
speedfloat—
shootAtEnemiesBOOL—
distanceToStopAtfloat—
noRoadsDistancefloat—
unkTrueBOOL—
unkFlagint—
aimingFlagint—
firingPatternHash—

Returns void

Usage

Lua
TaskGoToCoordAndAimAtHatedEntitiesNearCoord(ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern)

-- always works, by hash
Citizen.InvokeNative(0xA55547801EB331FC, ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern)
JavaScript and C#
JavaScript
TaskGoToCoordAndAimAtHatedEntitiesNearCoord(ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern);

// by hash
Citizen.invokeNative('0xA55547801EB331FC', ped, goToLocationX + 0.0000001, goToLocationY + 0.0000001, goToLocationZ + 0.0000001, focusLocationX + 0.0000001, focusLocationY + 0.0000001, focusLocationZ + 0.0000001, speed + 0.0000001, shootAtEnemies, distanceToStopAt + 0.0000001, noRoadsDistance + 0.0000001, unkTrue, unkFlag, aimingFlag, firingPattern);
C#
Function.Call((Hash)0xA55547801EB331FC, ped, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.