Changes the amount of ammunition for a weapon.
It works for weapons which are dropped on the ground or which are currently carried by a player.
- To change ammo of a weapon carried by a player: id = player ID, weapon = weapon type (see list below)
- To change ammo of a dropped weapon on the map: id = item ID on map, weapon = 0
You can set the ammo which will be loaded in the weapon (ammoin
) and spare ammo (ammo
) which can be reloaded. Use the value 1000 to keep the current ammo value unchanged (in case you only want to change one of two values).
Weapon and item IDs:
Note: You can use the value 1000 for ammoin and ammo to keep the current value unchanged.
Note: Maximum values are limited by the weapon attributes. You can't put more ammo into a weapon than it normally holds.
Attention: The first parameter can be either a player ID or the ID of a dropped item! If you specify the ID of a dropped item, the second parameter must be 0!