WeaponClient

giveLoadoutToPed

GIVE_LOADOUT_TO_PED0x68F8BE6AF5CDF8A6

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

SignatureJavaScript
giveLoadoutToPed(ped: Ped, loadoutHash: Hash): void
SignatureLua
giveLoadoutToPed(ped: Ped, loadoutHash: Hash)

Usage

JavaScript
giveLoadoutToPed(ped, loadoutHash);
Lua
giveLoadoutToPed(ped, loadoutHash)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
loadoutHashHashnumberinteger

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.

Gives the specified loadout to the specified ped.
Loadouts are defined in common.rpf\data\ai\loadouts.meta

Reference

Namespace
Weapon WEAPON
In the game
void GIVE_LOADOUT_TO_PED(Ped ped, Hash loadoutHash)
Hash
0x68F8BE6AF5CDF8A6
Introduced
Game build 505 legacy numbering
Formerly
_GIVE_LOADOUT_TO_PED

Open in the interactive natives reference