WeaponClientNot in this build

setAmmoInVehicleWeaponClip

_SET_AMMO_IN_VEHICLE_WEAPON_CLIP0x873906720EE842C3

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

SignatureJavaScript
setAmmoInVehicleWeaponClip(
  vehicle: Vehicle,
  seat: number,
  ammo: number
): boolean
SignatureLua
setAmmoInVehicleWeaponClip(
  vehicle: Vehicle,
  seat: integer,
  ammo: integer
): boolean
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const result = setAmmoInVehicleWeaponClip(vehicle, seat, ammo);
Lua
local result = setAmmoInVehicleWeaponClip(vehicle, seat, ammo)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
seatintnumberinteger
ammointnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Weapon WEAPON
In the game
BOOL _SET_AMMO_IN_VEHICLE_WEAPON_CLIP(Vehicle vehicle, int seat, int ammo)
Hash
0x873906720EE842C3
Introduced
Game build 3407 legacy numbering

Open in the interactive natives reference