03.11.2016, 20:32
Quote:
If you want to create some kind of admin invincibility, then I suggest you set the health of a player everytime they take the damage (OnPlayerTakeDamage(...) callback), alternatively OnPlayerUpdate to keep resetting them.
Specifically for anti-hack, I suggest you very much use OnPlayerUpdate and set their health (SetPlayerHealth) by having it saved down into a player enum everytime it changes. Example of what I mean: Код:
enum playerInfo{ Float:pHealth }; new pInfo[MAX_PLAYERS][playerInfo]; OnPlayerTakeDamage(...) { GetPlayerHealth(playerid, pInfo[playerid][pHealth]); return 1; } OnPlayerUpdate(...) { SetPlayerHealth(playerid, pInfo[playerid][pHealth]); return 1; } |
If you /sethp someone's HP to higher than 255, you get blocked and are being told to use /god.
/god is a command I just made further to this question, simply if(GodMode[hitid]) return 0; under OnPlayerWeaponShot
Thanks anyways for trying mate
My anti hack is quiet more powerful, if your HP (getplayerhealth) or armor != your HP / AP variable, Banned.
That's why it's so hard to make it, to prevent ANY unnecessary bans