10.09.2011, 12:59
Then use the piece i posted to get the data, and then do:
Also dont forget to make the 'ammo' variable player-bounded (add [MAX_PLAYERS] to it), otherwise it will just get playerid's 0 ammo.
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]);