SA-MP Forums Archive
Health-protection bug -.- onplayerdeath - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Health-protection bug -.- onplayerdeath (/showthread.php?tid=545686)



Health-protection bug -.- onplayerdeath - Metharon - 09.11.2014

Ok ,well i made a protection if the player have more than 95 HP + to get kicked.


but i have a problem... the cheat is checking the hp of player with OnPlayerUpdate , i tried with a variable


Код:
 if(AntiHealthbug[playerid] != 1)
 {

   //kick
 }
and on onplayerdeath antihealthbug = 1; ... but it still doesen't work , the player get kicked on death...


how can i fix it ?


Re: Health-protection bug -.- onplayerdeath - Abagail - 09.11.2014

Try something like this.

pawn Код:
public OnPlayerUpdate(playerid)
{
     if(health == 100.0 && AntiHealthBug[playerid] == 1)
     {
            return 1;
     }
     return 1;
}