Game not responding after shoot all ammo
#1

I had add for my gamemode which all the gun will have bullets.But after shoot out all the ammo, my game is not reponding, all the time which i try to test shoot out the ammo again the game is not responding and stop working all the time
Please help me
Reply
#2

show us public onplayerweaponshot
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)