WeaponClient

requestWeaponAsset

REQUEST_WEAPON_ASSET0x5443438F033E29C3

The GTA V native REQUEST_WEAPON_ASSET of the WEAPON namespace, as LS:MP client scripts call it: the global function requestWeaponAsset, in JavaScript and in Lua.

SignatureJavaScript
requestWeaponAsset(weaponHash: Hash, p1: number, p2: number): void
SignatureLua
requestWeaponAsset(weaponHash: Hash, p1: integer, p2: integer)

Usage

JavaScript
requestWeaponAsset(weaponHash, p1, p2);
Lua
requestWeaponAsset(weaponHash, p1, p2)

Parameters

ParameterTypeJavaScriptLua
weaponHashHashnumberinteger
p1intnumberinteger
p2intnumberinteger

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.

Nearly every instance of p1 I found was 31. Nearly every instance of p2 I found was 0.

requestWeaponAsset(iLocal_1888, 31, 26);

Reference

Namespace
Weapon WEAPON
In the game
void REQUEST_WEAPON_ASSET(Hash weaponHash, int p1, int p2)
Hash
0x5443438F033E29C3

Open in the interactive natives reference