LuaAPI.wiki
changeset 911 eaafb853db57
parent 907 69a88515a116
child 912 ea13b02292c5
equal deleted inserted replaced
910:714fb7f71640 911:eaafb853db57
   755 === <tt>!AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) </tt> ===
   755 === <tt>!AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) </tt> ===
   756 Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` event handler. In 0.9.16 ammo can be set directly via the optional third parameter, `ammoCount`. A value of 0 will remove the weapon, a value of 100 will give infinite ammo.
   756 Adds `ammoType` to the specified gear. The amount added is determined by the arguments passed via `SetAmmo()` in the `onAmmoStoreInit()` event handler. In 0.9.16 ammo can be set directly via the optional third parameter, `ammoCount`. A value of 0 will remove the weapon, a value of 100 will give infinite ammo.
   757 
   757 
   758 *Note:* The effectiveness of this function may be limited due to problems with `gfPerHogAmmo` in Lua scripting.
   758 *Note:* The effectiveness of this function may be limited due to problems with `gfPerHogAmmo` in Lua scripting.
   759 
   759 
       
   760 === <tt>!GetAmmoName(ammoType)</tt> (0.9.23) ===
       
   761 Returns the localized name for the specified `ammoType`.
   760 
   762 
   761 === <tt>!SetHealth(gearUid, health)</tt> ===
   763 === <tt>!SetHealth(gearUid, health)</tt> ===
   762 Sets the health of the specified gear. The “health” of a gear can refer to many things, depending on the gear type.
   764 Sets the health of the specified gear. The “health” of a gear can refer to many things, depending on the gear type.
   763 
   765 
   764 Use cases:
   766 Use cases: