Weapons Ammo
#12

Then use the piece i posted to get the data, and then do:
pawn Code:
new Totalammo[MAX_PLAYERS]; // global variable
Totalammo[playerid] = (ammo[playerid][0] + ammo[playerid][1] + ammo[playerid][2] ...... +ammo[playerid][12]);
printf("%s has %i ammo. ", GetName(playerid), TotalAmmo[playerid]);
Also dont forget to make the 'ammo' variable player-bounded (add [MAX_PLAYERS] to it), otherwise it will just get playerid's 0 ammo.
Reply


Messages In This Thread
Weapons Ammo - by Dragony92 - 10.09.2011, 11:34
Re: Weapons Ammo - by Sasino97 - 10.09.2011, 11:36
Re: Weapons Ammo - by Dragony92 - 10.09.2011, 11:36
Re: Weapons Ammo - by Tigerkiller - 10.09.2011, 12:15
Re: Weapons Ammo - by Wesley221 - 10.09.2011, 12:26
Re: Weapons Ammo - by Tigerkiller - 10.09.2011, 12:34
Re: Weapons Ammo - by Wesley221 - 10.09.2011, 12:37
Re: Weapons Ammo - by Dragony92 - 10.09.2011, 12:38
Re: Weapons Ammo - by Tigerkiller - 10.09.2011, 12:41
Re: Weapons Ammo - by Wesley221 - 10.09.2011, 12:41
Re: Weapons Ammo - by Dragony92 - 10.09.2011, 12:55
Re: Weapons Ammo - by Wesley221 - 10.09.2011, 12:59
Re: Weapons Ammo - by Tigerkiller - 10.09.2011, 12:59
Re: Weapons Ammo - by Wesley221 - 10.09.2011, 13:42
Re: Weapons Ammo - by Dragony92 - 10.09.2011, 13:48
Re: Weapons Ammo - by andrew4699 - 10.09.2011, 15:20

Forum Jump:


Users browsing this thread: 2 Guest(s)