GIVE_WEAPON_TO_PED
GIVE_WEAPON_TO_PED This is the server-side RPC native equivalent of the client native GIVE_WEAPON_TO_PED.
Signature
void GIVE_WEAPON_TO_PED(Ped ped, Hash weaponHash, int ammoCount, BOOL isHidden, BOOL bForceInHand);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
weaponHash | Hash | — |
ammoCount | int | — |
isHidden | BOOL | — |
bForceInHand | BOOL | — |
Returns void
Description
This is the server-side RPC native equivalent of the client native GIVE_WEAPON_TO_PED.
Usage
GiveWeaponToPed(ped, weaponHash, ammoCount, isHidden, bForceInHand)
-- always works, by hash
Citizen.InvokeNative(0xc4d88a85, ped, weaponHash, ammoCount, isHidden, bForceInHand)JavaScript and C#
GiveWeaponToPed(ped, weaponHash, ammoCount, isHidden, bForceInHand);
// by hash
Citizen.invokeNative('0xc4d88a85', ped, weaponHash, ammoCount, isHidden, bForceInHand);Function.Call((Hash)0xc4d88a85, ped, weaponHash, ammoCount, isHidden, bForceInHand);- 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`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.