Player::getWeaponAmmo
Get the ammo of the current weapon of the player.
Syntax
player.getWeaponAmmo(weaponHash);
Parameters
- weaponHash: Int
Examples
We obtain the ammo of our equipped weapon.
Server-Side
var weapon = player.weapon;
var ammo = player.getWeaponAmmo(weapon);
player.outputChatBox("The weapon has "+ammo+" bullets.");