17.09.2011, 18:13
Hi all,
Today I've think about trying to make my own little anti-cheat. This Anticheat consist in, if player (for example) use SetPlayerHealth with a cheat system, ban him. So, I've thinking about redefine this fonction, such as:
As you can see, this is call the same basic fonction but with an other name, should it work?
An Exemple for securemoney:
The code before will ban the player if he call the basic "GivePlayerMoney" fonction, but let's see this code:
Will this code, the player will be banned or not?
Sorry but I don't know how to explain it... I think player will be banned in all examples, but I prefer to ask.
Thank's,
Sreadon.
Today I've think about trying to make my own little anti-cheat. This Anticheat consist in, if player (for example) use SetPlayerHealth with a cheat system, ban him. So, I've thinking about redefine this fonction, such as:
pawn Код:
#define securemoney GivePlayerMoney
#define secureweapon GivePlayerWeapon
...
An Exemple for securemoney:
pawn Код:
if(GivePlayerMoney(playerid, > 0))
{
SendClientMessage(playerid, COLOR_RED, "Vous avez йtй banni pour cheat argent");
SendClientMessage(playerid, COLOR_RED, "Si vous pensez qu'il s'agit d'une erreur, veuillez screener cette page et poster sur notre forum");
SendClientMessage(playerid, COLOR_RED, "PS: Il est inutile de poster si vous avez rйellement cheat argent");
Ban(playerid);
format(string, sizeof(string), "[R2D2]: %s a йtй banni du serveur pour cheat argent", playerid);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playerid][pLocked] = 1;
return 1;
}
pawn Код:
if(strcmp(cmd, "/moneytest", true)==0)
{
securemoney(playerid, 10000);
return 1;
}
Sorry but I don't know how to explain it... I think player will be banned in all examples, but I prefer to ask.
Thank's,
Sreadon.