19.10.2015, 10:13
If you are trying to do something when you have 0 ammo, your "detector" has to be:
I found that with GetPlayerAmmo, it always returns ammo + 1, which is probably why when you run out of ammo, the game removes your weapon when it returns with 1 ammo. So if you detect if (using the sample above):
Without subtracting 1 from GetPlayerAmmo, you will never reach 0, so the script will never respond.
Source: Personal knowledge.
pawn Код:
//Example
new ammo = (GetPlayerAmmo(playerid) - 1);
pawn Код:
if(ammo == 0)
Source: Personal knowledge.