WarCraft: Source

 

AmmoAdd

Page history last edited by freddukes@... 1 yr ago

AmmoAdd

 


 

This command adds the value to the current users ammo amount. The ammo is the amount of ammo in reserver, not the clip size; don't get confused. This is similar to the command Ammo, except it adds the value instead of setting it.

 

The correct syntax is:

 

wcs.Command(<userid>).AmmoAdd(<value to add>, <slot 1/2>)

 

  • Userid - The player that you want to change the value of the ammo size
  • Value to add - The amount of ammo to add
  • Slot - 1 = Primary --- 2 = Secondary

 

 


 

 

Example:

 

  1. def weapon_reload(ev):
  2.     wcs.Command(ev['userid']).AmmoAdd(10,1)
  3.     # Adds 10 ammo to the players primary weapon when he reloads

 

Comments (0)

You don't have permission to comment on this page.