Player::setAmmoInClip

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax

Sets ammo in clip for given weapon hash, the player must have that weapon in his weapon list.

Required Params

  • weapon: number
  • ammo: number

Return value

  • void

Syntax

player.setAmmoInClip(weapon, ammo);

Example

mp.players.local.giveWeapon(mp.game.joaat("weapon_pistol"), 100, false);
mp.players.local.setAmmoInClip(mp.game.joaat("weapon_pistol"), 1); //set 1 ammo loaded in player's pistol clip.


See also