05.01.2011, 23:53
Well, it works =/ (i hope :O.. not tested)
On Top:
OnGameModeInit():
Put it where you want:
On Top:
pawn Код:
forward AntiMoneyCheat();
#define MONEY_LIMIT 15000000 //The MAX limit of money.. if he have more that that, then his money get reset.
pawn Код:
SetTimer("AntiMoneyCheat",1000,1);
pawn Код:
public AntiMoneyCheat()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerAdmin(i) && IsPlayerConnected(i))
{
if(GetPlayerMoney(i)>=MONEY_LIMIT)
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "Anti Cheat: %s(%d) Please dont hack", name, i);
SendClientMessageToAll(COLOR_ANTIHAX,string);
ResetPlayerMoney(i); //Resets the player money
}
}
}
return 0;
}