SA-MP Forums Archive
Antimoney-hack Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Antimoney-hack Problem (/showthread.php?tid=385292)



Antimoney-hack Problem - RedFusion - 15.10.2012

I keep getting banned even though the values are correct..
pawn Код:
public antihack(playerid)
{
    if(GetPlayerMoney(playerid) < iCash[playerid]) iCash[playerid] = GetPlayerMoney(playerid);// < Works without this line, but i need it.
    if(GetPlayerMoney(playerid) > iCash[playerid])
    {
        new string[128];
        format(string,sizeof(string),"Autoban: Money-hacks (Money: $%i | Amount: $%i)",GetPlayerMoney(playerid),GetPlayerMoney(playerid)-iCash[playerid]);
        SendClientMessage(playerid,COLOR_RED,string);
        BanEx(playerid,string), print(string);
        return 1;
    }
    return 1;
}



AW: Antimoney-hack Problem - BiosMarcel - 15.10.2012

Only Use GivePlayerMoneyEx not GivePlayerMoney

PHP код:
new TimerGK[MAX_PLAYERS];
new 
mongk[MAX_PLAYERS]
forward RSGK(playerid);
public 
RDGK(playerid)
{
    
mongk[playerid] = 0;
    return 
1:
}
public 
OnPlayerUpdate(playerid)
{
    if(
GetPlayerMoney(playerid) != iCash[playerid])
    {
    if(
mongk[playerid] != 1)
    {
        new 
string[128];
        
format(string,sizeof(string),"Autoban: Money-hacks (Money: $%i | Amount: $%i)",GetPlayerMoney(playerid),GetPlayerMoney(playerid)-iCash[playerid]);
        
SendClientMessage(playerid,COLOR_RED,string);
        
BanEx(playerid,string), print(string);
    }
    }
    return 
1;
}
stock GivePlayerMoneyEx(playerid,money)
{
    
GivePlayerMoney(playerid,money);
    
iCash[playerid] = GetPlayerMoney(playerid);
    
mongk[playerid] = 1;
    
TimerGK[playerid] = SetTimer("RSGK",1250,false);
    return 
1;




Re: Antimoney-hack Problem - RedFusion - 15.10.2012

Dude im not retarded. I have a function for serversided cash.


AW: Antimoney-hack Problem - BiosMarcel - 15.10.2012

I want to help not more ^^

I haven't said that you haven't one but use this system i think this should works nice


Re: Antimoney-hack Problem - RedFusion - 15.10.2012

pawn Код:
if(iCash[playerid] > GetPlayerMoney(playerid)) iCash[playerid] = GetPlayerMoney(playerid), printf("%s Money:%i Servermoney:%i",iName(playerid),GetPlayerMoney(playerid),iCash[playerid]);
Prints: Fusez Money:0 Servermoney:0 :S