[FilterScript] AntiMoneyCheat
#1

hello.I bring you my anticheat

beetwen news:
Код:
new money[MAX_PLAYERS];
beetwen forward:
Код:
forward GetPlayerMoney_Ex(playerid);
forward GivePlayerMoney_Ex(playerid,penize);
forward ResetPlayerMoney_Ex(playerid);
forward SetPlayerMoney_Ex(playerid,penize);
forward ControlMoneyCheat();
to OnGameModeInit:
Код:
SetTimer("ControlMoneyCheat",1579,1);
Код:
public GetPlayerMoney_Ex(playerid)
{
return money[playerid];//toto je promena podle ktere se cela moneycheat drzi a kontroluje
}

public GivePlayerMoney_Ex(playerid,penize)
{
   ResetPlayerMoney(playerid);//pro jistotu odebereme
   GivePlayerMoney(playerid,money[playerid]);//same castku kterou mnel mit
   GivePlayerMoney(playerid,penize);//+pridame penize kterou ma obdrzet
   money[playerid] = GetPlayerMoney(playerid);//+nastavi do promene aby jsme mnely kontrolu
return 0;
}

public ResetPlayerMoney_Ex(playerid)
{
   money[playerid] = 0;//promena na nulu
   ResetPlayerMoney(playerid);//sebere penize
return 0;
}

public SetPlayerMoney_Ex(playerid,penize)
{
   money[playerid] = penize;
   ResetPlayerMoney(playerid);//sebereme penize
   GivePlayerMoney(playerid,penize);//pridame urcenou castku
return 0;
}

public ControlMoneyCheat()
{
   new penize[MAX_PLAYERS];
   for(new i=0; i<MAX_PLAYERS; i++)
   {
       if(IsPlayerConnected(i))
      {
       penize[i] = GetPlayerMoney(i);
           if(penize[i] > GetPlayerMoney_Ex(i))
         {
            ResetPlayerMoney(i);
            GivePlayerMoney(i,GetPlayerMoney_Ex(i));
            }else{
            SetPlayerMoney_Ex(i,penize[i]);
            }
        }
    }
}
REPLACED:
GetPlayerMoney to GetPlayerMoney_Ex
GivePlayerMoney to GivePlayerMoney_Ex
ResetPlayerMoney to ResetPlayerMoney_Ex
SetPlayerMoney to SetPlayerMoney_Ex


PS:It is not my script!!!
PSS:I do not know English

Credits: ATomas
Reply


Messages In This Thread
AntiMoneyCheat - by markoff - 05.07.2012, 06:13
Re: AntiMoneyCheat - by Glint - 05.07.2012, 06:18
Re: AntiMoneyCheat - by markoff - 05.07.2012, 06:21
Re : AntiMoneyCheat - by bousla7e - 05.07.2012, 09:24
Re: AntiMoneyCheat - by im - 05.07.2012, 13:20

Forum Jump:


Users browsing this thread: 2 Guest(s)