SA-MP Forums Archive
AntiGodMode. - 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: AntiGodMode. (/showthread.php?tid=184441)



AntiGodMode. - Dodus - 19.10.2010

Hello. I have the question - how i can make the AntiGodMode?

Thanks for help.


Re: AntiGodMode. - iggy1 - 19.10.2010

You could check if a players health is over 100 if it is kick or ban. I've not tested but i can't see why it won't work unless im missing something.


Re: AntiGodMode. - Las Venturas CNR - 20.10.2010

Quote:
Originally Posted by iggy1
Посмотреть сообщение
You could check if a players health is over 100 if it is kick or ban. I've not tested but i can't see why it won't work unless im missing something.
In that case....

pawn Код:
new Float:health;
    GetPlayerHealth(playerid,health);
    if (health > 100.0)
    {
        SendClientMessage(playerid, COLOR_RED, "You've been banned for health hacks.");
        BanEx(playerid, "HP Hacks" );
    }

You will need to make your own call back, put this in a timer, and have it scan all players using MaxPlayers, GetMaxPlayers or whatever.