Anti God-mode problem
#8

Hi again, due to MouseBreaker information about OnPlayerUpdate, i decided to add a timer, that will check each second player's HP.

so i did:

PHP код:
new Float:health_a,Float:health_b;
new 
timer1;
forward HealthUpdate();
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Anti Cheats - LOADED");
    print(
"--------------------------------------\n");
    
    
timer1 SetTimer("HealthUpdate"10001);
    return 
1;
}
public 
HealthUpdate()
{
    for(new 
0MAX_PLAYERSi++)
    {
        
GetPlayerHealth(i,health_a);
    }
    return 
1;
}
public 
OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    
KillTimer(timer1);
    
GetPlayerHealth(playerid,health_b);
    if(
health_a >= health_b)
    {
        if (
GetPlayerVirtualWorld(playerid)==1)
        {
            if(!
IsPlayerLuxAdminLevel(playerid,10))
            {
                new 
pname[MAX_PLAYER_NAME];
                new 
string[170];
                
GetPlayerName(playeridpnamesizeof(pname));
                
format(stringsizeof(string), "%s(%d) tried to GOD-Mode in dm/minigun."pnameplayerid);
                
MessageToAdmins(-1,string);
                
ResetPlayerWeapons(playerid);
                
SetPlayerHealth(playerid100);
                
SetPlayerVirtualWorld(playerid0);
                
SetPlayerPos(playerid,-1670.1058,1303.2300,7.1820);
                
SetCameraBehindPlayer(playerid);
                
SendClientMessage(playerid, -"God-Mode detected, you have been automaticly teleported to spawn.");
                return 
1;
            }
        }
    }
    
timer1 SetTimer("HealthUpdate"10001);
    return 
1;

But still the same problem. Please can anyone help me on this?
Reply


Messages In This Thread
Anti God-mode problem - by ]Rafaellos[ - 26.01.2013, 08:48
AW: Anti God-mode problem - by Skimmer - 26.01.2013, 09:06
Re: Anti God-mode problem - by ]Rafaellos[ - 26.01.2013, 09:21
Re: Anti God-mode problem - by Patrick - 26.01.2013, 09:25
Re: Anti God-mode problem - by ]Rafaellos[ - 26.01.2013, 09:33
Re: Anti God-mode problem - by Patrick - 26.01.2013, 09:36
Re: Anti God-mode problem - by ]Rafaellos[ - 26.01.2013, 09:44
Re: Anti God-mode problem - by ]Rafaellos[ - 27.01.2013, 08:45
Re: Anti God-mode problem - by Threshold - 27.01.2013, 09:13
Re: Anti God-mode problem - by ]Rafaellos[ - 27.01.2013, 09:18

Forum Jump:


Users browsing this thread: 1 Guest(s)