TasksClient

taskSwapWeapon

TASK_SWAP_WEAPON0xA21C51255B205245

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

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

Usage

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

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
drawWeaponBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

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

Open in the interactive natives reference