11.06.2011, 21:01
Coldheart, your Anti-Armour and Anti-Health code will NEVER work.
1) GetPlayerHealth will only return values between 0 and 255 (as far as I know).
2) Why would you ban someone with full armour? That's not cheating?
3) Actually the code for checking health and armour is nonsense:
GetPlayerHealth and GetPlayerArmour do both NOT return any health/armour value.
compare the variables health and armour with the numbers after you have used GetPlayerHealth/Armour.
Before you try making an anti-cheat, you should know how to use a specific function correctly.
---
This will also not work correctly.
That's will not work at all because the server does as far as I know (since SA-MP isn't multithread except for HTTP as far as I know) not send/recieve data until the PAWN code has been executed. Even If it would update while PAWN code is executed, the players health would never update fast enough: Player must recieve information that his health has been lowered and also has to send back data of his updated health.
1) GetPlayerHealth will only return values between 0 and 255 (as far as I know).
2) Why would you ban someone with full armour? That's not cheating?
3) Actually the code for checking health and armour is nonsense:
pawn Код:
if(GetPlayerHealth(playerid, health) > 999999)
if(GetPlayerArmour(playerid, armor) == 100)
compare the variables health and armour with the numbers after you have used GetPlayerHealth/Armour.
pawn Код:
GetPlayerHealth(playerid, health);
if(health > 100)
{
...//If server doesn't set higher amounts of health than 100, the player is a cheater.
---
Quote:
|
Looks nice, however some methods wont work on every hack.
Your checking the player's health as instance if its above 999999, but what if i use cheatengine and set it to 999998 ? Can't you try something like this (im now sure if this is a good method however): pawn Код:
I think its much more effective. |
pawn Код:
GetPlayerHealth(i,health);
SetPlayerHealth(i,(health -1)); //check if you can remove 1 HP
GetPlayerHealth(i,check); //verify the check

