Player::getWeaponAmmo

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

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.");