TASK_GRAPPLE
Signature
BOOL TASK_GRAPPLE(Ped ped, Ped targetPed, Hash grappleStyle, int p3, float p4, int p5, int p6);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
targetPed | Ped | — |
grappleStyle | Hash | — |
p3 | int | — |
p4 | float | — |
p5 | int | — |
p6 | int | — |
Returns BOOL
Description
grappleStyle: AR_GRAPPLE_MOUNT_STANDING_FROM_FRONT, AR_GRAPPLE_MOUNT_STANDING_FROM_RIGHT, AR_GRAPPLE_MOUNT_STANDING_FROM_BACK, AR_GRAPPLE_MOUNT_STANDING_FROM_LEFT, AR_GRAPPLE_MOUNT_FROM_FRONT, AR_WOLF_EXECUTION_ENTER_FROM_BACK, AR_GRAPPLE_DRAG_FRONT_ON_ASS, AR_GRAPPLE_FRONT_FROM_LEFT_FAR, AR_BEAR_CHALLENGE_FRONT, AR_GRAPPLE_FRONT_FROM_FRONT, AR_GRAPPLE_MOUNT_FACEUP_FROM_FRONT
Usage
local retval = TaskGrapple(ped, targetPed, grappleStyle, p3, p4, p5, p6)
-- always works, by hash
local retval = Citizen.InvokeNative(0x779A2FFACEFAEA7B, ped, targetPed, grappleStyle, p3, p4, p5, p6, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = TaskGrapple(ped, targetPed, grappleStyle, p3, p4, p5, p6);
// by hash
const retval = Citizen.invokeNative('0x779A2FFACEFAEA7B', ped, targetPed, grappleStyle, p3, p4 + 0.0000001, p5, p6, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0x779A2FFACEFAEA7B, ped, targetPed, grappleStyle, p3, p4, p5, p6);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.