Skip to main content

Player::weaponAmmo

Server-side function

JavaScript​

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}`);
});