

// OnGameModeInit -//
SetTimer("CheckGrana",1500,true);
//- Final GameMode -//
stock GivePlayerCash(playerid,Contia)
{
GivePlayerMoney(playerid,Contia);
SetPVarInt(playerid,"grana",Contia);
SetPVarInt(playerid,"AntiMH",10);
return true;
}
forward CheckGrana();
public CheckGrana()
{
for(new i = 0;i < MAX_PLAYERS;i++)
{
if(GetPVarInt(i,"AntiMH") == 10)
{
SetPVarInt(i ,"AntiMH",0);
return 0;
}
if(GetPlayerMoney(i) < GetPVarInt(i,"grana"))
{
SetPVarInt(i,"grana",GetPlayerMoney(i));
}
if(GetPlayerMoney(i) > GetPVarInt(i,"grana"))
{
ResetPlayerMoney(i);
GivePlayerMoney(i,GetPVarInt(i,"grana"));
}
}
return true;
}
new AntiBadCash=GetPlayerMoney(playerid);
if(AntiBadCash>=/*Maximum Money, Example: ("10000001")*/) return ResetPlayerMoney(playerid);
|
stock GivePlayerCash(playerid, money) { SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money); GivePlayerMoney(playerid, money); return 1; } |
|
Try and use server sided money. Really hard to hack because most hacks hack the client sided money not the server sided. Or you can take a look at this anti cheat plugin http://forum.sa-mp.com/showthread.ph...er+sided+money
|
