Player::weaponAmmo

From RAGE Multiplayer Wiki

Server-Side
Function

 JavaScript



JavaScript Syntax

Returns the amount of ammo from the current player's weapon

  • Note: this property is read-only.

Syntax

player.weaponAmmo;

Example

This command will show how many ammo the player has in his currently equipped weapon.

Server-Side
mp.events.addCommand('ammo', (player) => {
  player.notify(`Ammo: ${player.weaponAmmo}`);
});


See Also