_SHOOT_TRIGGER_AT_COORDS
Triggers a gunshot
Hash
0x4C57F27D1554E6B0Runtime name
ShootTriggerAtCoordsNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
Any _SHOOT_TRIGGER_AT_COORDS(Ped ped, float x, float y, float z, int p4, float p5, int p6, float p7);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
x | float | — |
y | float | — |
z | float | — |
p4 | int | — |
p5 | float | — |
p6 | int | — |
p7 | float | — |
Returns Any
Description
Triggers a gunshot
Params: p5 = -1 in R* Scripts
Usage
local retval = ShootTriggerAtCoords(ped, x, y, z, p4, p5, p6, p7)
-- always works, by hash
local retval = Citizen.InvokeNative(0x4C57F27D1554E6B0, ped, x, y, z, p4, p5, p6, p7, Citizen.ResultAsInteger())JavaScript and C#
const retval = ShootTriggerAtCoords(ped, x, y, z, p4, p5, p6, p7);
// by hash
const retval = Citizen.invokeNative('0x4C57F27D1554E6B0', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, p4, p5 + 0.0000001, p6, p7 + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x4C57F27D1554E6B0, ped, x, y, z, p4, p5, p6, p7);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.