17.03.2017, 13:43
A bit curious
Whats the point of the first two lines in this function?
pawn Код:
ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
{
if(ac_ammo < -32768) ac_ammo = -32768; // <-
else if(ac_ammo > 32767) ac_ammo = 32767;// <-
SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
if(16 <= ac_weaponslot <= 43 && (ACInfo[playerid][acWeapon][ac_wSlot[ac_weaponslot]] > 0 ||
ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponslot]] > 0))
{
ACInfo[playerid][acNOPCount][1] = 0;
ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponslot]] = ac_ammo;
ACInfo[playerid][acGtcGiveAmmo][ac_wSlot[ac_weaponslot]] = GetTickCount();
}
return 1;
}