12.05.2012, 06:55
Since you aren't really returning anything significant you can use this instead...
pawn Код:
new pGunInfo[MAX_PLAYERS][13];
//We can set these cells to their current ammo cap for each weapon slot.
public IsAtAmmoLimit(playerid)
{
new weapon[13][2];
for(new i=0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapon[i][0], weapon[i][1]);
if(weapon[i][1] > pGunInfo[playerid][i]) return true; //this will check if any are above that, then it will return true
}
return false; //if none of the weapons have more ammo than their cap it will get to this then return false
}