equal
deleted
inserted
replaced
356 </blockquote> |
356 </blockquote> |
357 Example: |
357 Example: |
358 |
358 |
359 <code lang="lua"> !SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players |
359 <code lang="lua"> !SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players |
360 !SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade</code> |
360 !SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade</code> |
361 === <tt>!AddAmmo(gearUid, ammoType)</tt> === |
361 === <tt>!AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) </tt> === |
362 |
362 |
363 <blockquote>Adds ammoType to the specified gear. The amount added is determined by the arguments passed via !SetAmmo() in the onAmmoStoreInit() event handler. |
363 <blockquote>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. |
364 |
364 |
365 *Note:* The effectiveness of this function may be limited due to problems with gfPerHogAmmo in lua scripting. |
365 *Note:* The effectiveness of this function may be limited due to problems with gfPerHogAmmo in lua scripting. |
366 |
366 |
367 </blockquote> |
367 </blockquote> |
368 === <tt>!SetHealth(gearUid, health)</tt> === |
368 === <tt>!SetHealth(gearUid, health)</tt> === |