Game not responding after shoot all ammo
#3

If you are trying to do something when you have 0 ammo, your "detector" has to be:

pawn Код:
//Example
new ammo = (GetPlayerAmmo(playerid) - 1);
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):

pawn Код:
if(ammo == 0)
Without subtracting 1 from GetPlayerAmmo, you will never reach 0, so the script will never respond.

Source: Personal knowledge.
Reply


Messages In This Thread
Game not responding after shoot all ammo - by Zeddclarity - 19.10.2015, 07:49
Re: Game not responding after shoot all ammo - by Crystallize - 19.10.2015, 10:04
Re: Game not responding after shoot all ammo - by Aerotactics - 19.10.2015, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)