SA-MP Forums Archive
help with anticheat - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with anticheat (/showthread.php?tid=97174)



help with anticheat - mr.b - 13.09.2009

hi i got this anti cheat but i have a problem

the problem is when a player enter with the id 0 his has kick for health hack then when a player enter with another id don't got kicked and the anticheat work fine

the problem it's only with the id 0 why??
thanks

here is the code

Quote:

forward GodmodeCheat();

Quote:

public GodmodeCheat(){
for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && !IsPlayerAdmin(i)){
new Floathealth;
GetPlayerHealth(i, xhealth);
if(xhealth>= 100)
{
SetPlayerHealth(i, 99);
GetPlayerHealth(i, xhealth);
if(xhealth== 100)
{
Kick(i);
return 1;
}
return 1;
}
if(xhealth== 101){
Kick(i);
return 1;
}

Quote:

SetTimer("GodmodeCheat",1000,1);




Re: help with anticheat - mr.b - 14.09.2009

anyone?