Soldier.addAmmo 80
Adds an ammo box to the soldier's invetory
Return value
Return Type | Description |
---|---|
bool | Returns true if the ammo box has been added to the soldier's inventory successfully |
Parameters
Parameter | Type | Description |
---|---|---|
1 | string | The id of the ammo box |
2 | integer | (Optional) The number of bullets to put in the box (Default is 0). NOTE: You can set the box capacity to any value. To add boxes with ammo set at their default full capacity there are different functions. |
Examples
Example 123
local player = er2.getPlayer()
player.addAmmo("ammo_30_06", 500) -- Adds a box of 500 30.06 bullets to the player's inventory