06.09.2012, 15:03
I tried this code
But do you think it will reset my money to original? Like I said
"And lastly let's say if my money is 3000 then I used a money cheat it should return to 3000"
pawn Код:
stock GivePlayerCash(playerid,Contia)
{
GivePlayerMoney(playerid,Contia);
SetPVarInt(playerid,"grana",GetPlayerMoney(playerid));
SetPVarInt(playerid,"AntiMH",10);
}
forward CheckGrana();
public CheckGrana()
{
for(new to_dos = 0;to_dos < MAX_PLAYERS;to_dos++)//todos players
{
if(GetPVarInt(to_dos,"AntiMH") == 10)
{
SetPVarInt(to_dos ,"AntiMH",0);
return 0;
}
if(GetPlayerMoney(to_dos) < GetPVarInt(to_dos,"grana")) SetPVarInt(to_dos,"grana",GetPlayerMoney(to_dos));
while(GetPlayerMoney(to_dos) <= GetPVarInt(to_dos,"grana")) return 0;
/*
//ban
*/
}
return 1;
}
"And lastly let's say if my money is 3000 then I used a money cheat it should return to 3000"