Player::getWeaponAmmo

From RAGE Multiplayer Wiki
Revision as of 20:14, 13 October 2019 by Sakatum (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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