Player::allWeapons

From RAGE Multiplayer Wiki
Revision as of 23:48, 26 December 2020 by Idle (talk | contribs) (Undo revision 20477 by Idle (talk))

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

Syntax

Object player.allWeapons;

Examples

It will show your weapon's 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