Player::allWeapons

From RAGE Multiplayer Wiki

Gets the player's weapon hash and ammo
Note: this property is read-only.

Syntax

Object player.allWeapons;

Examples

It will show player's weapon hash and ammo

Server-Side
mp.events.addCommand('weapons', (player) => {
  const weapons = player.allWeapons;
  for (let key in weapons) {
    player.notify(`Hash: ${key}, ammo: ${weapons[key]}`);
  }
});

See Also