TasksClient

taskReloadWeapon

TASK_RELOAD_WEAPON0x62D2916F56B9CD2D

The GTA V native TASK_RELOAD_WEAPON of the TASK namespace, as LS:MP client scripts call it: the global function taskReloadWeapon, in JavaScript and in Lua.

SignatureJavaScript
taskReloadWeapon(ped: Ped, drawWeapon: boolean): void
SignatureLua
taskReloadWeapon(ped: Ped, drawWeapon: boolean)

Usage

JavaScript
taskReloadWeapon(ped, drawWeapon);
Lua
taskReloadWeapon(ped, drawWeapon)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
drawWeaponBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

The 2nd param (drawWeapon) is not implemented.


The only occurrence I found in a R* script ("assassin_construction.ysc.c4"):

if (((v_3 < v_4) && (getScriptTaskStatus(playerPedId(), 0x6a67a5cc) != 1)) && (v_5 > v_3)) {
    taskReloadWeapon(playerPedId(), 1);
}

Reference

Namespace
Tasks TASK
In the game
void TASK_RELOAD_WEAPON(Ped ped, BOOL drawWeapon)
Hash
0x62D2916F56B9CD2D

Open in the interactive natives reference