Перейти к содержанию

Player::allWeapons

Материал из RAGE MP Wiki Archive
Версия от 23:49, 26 декабря 2020; imported>Idle
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

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