Godmode
#1

How i must to use to detect when player use godmode ? i try with that but don`t works.
PHP код:
GetPlayerHealth(playeridhealth);
    
AntiCheatInfo[playerid][acOldHealth] = health//OnPlayerUpdate(); 
PHP код:
if(!IsPlayerPaused(playerid) && amount 0.0)
        {
            
GetPlayerHealth(playeridhealth);
            if(
health == AntiCheatInfo[playerid][acOldHealth])
            {
                
WarningsGodmode[playerid] ++;
                
SendClientMessage(playeridCOLOR_RED"WARNING! Please stop using godmode cheats or you will get banned !");
                
format(stringsizeof(string), "WARNING: %s is suspected to using godmode cheats !"PlayerInfo[playerid][pUsername]);
                 
SendMessageToAdmins(1COLOR_YELLOWstring);
                
PlayerInfo[playerid][pFreezeTime] += 5;
                
TogglePlayerControllable(playerid0);
                
//SetPlayerHealtEx(playerid, health-amount);
                
if(WarningsGodmode[playerid] >= 5)
                {
                    
format(stringsizeof (string), "AdmCmd: %s has been kicked by AdmBot, reason: using cheats (godmode)",PlayerInfo[playerid][pUsername]);
                      
KickWithMessage(playeridCOLOR_LIGHTREDstring);
                }
             }
        } 
And This on OnPlayerTakeDamage. What else can I do?
Reply
#2

Solved ! I move the codes to OnPlayerGiveDamage and works fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)