Player::getWeaponAmmo: Difference between revisions
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
== Examples == | == Examples == | ||
Get the ammo of the weapon you are using. | |||
{{ServersideCode| | {{ServersideCode| | ||
Latest revision as of 20:14, 13 October 2019
Get the weapon's ammo.
Syntax
player.getWeaponAmmo(weaponHash);
Parameters
- weaponHash: Int
Examples
Get the ammo of the weapon you are using.
Server-Side
var weapon = player.weapon;
var ammo = player.getWeaponAmmo(weapon);
player.outputChatBox("The weapon has "+ammo+" bullets.");