Player::getWeaponAmmo

From RAGE Multiplayer Wiki

Get the weapon's ammo.

Syntax

player.getWeaponAmmo(weaponHash);

Parameters

  • weaponHash: Int

Examples

Get the ammo of the weapon you are using.

Server-Side
var weapon = player.weapon;
var ammo = player.getWeaponAmmo(weapon);
player.outputChatBox("The weapon has "+ammo+" bullets.");