Anti money hack notify.
#1

When it's giving me the message, Old Money, New Money it's both the same ammount.. Hope anyone will be able to help me out
pawn Код:
public AntiMoneyHack()
{
    new string[128];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if((GetPlayerMoney(i)-50000 >= gPlayer[i][money]) && IsPlayerConnected(i))
    {
    format(string,sizeof(string), "*NOTICE* %s(id: %d) is a suspect of moneyhacking. [Old Money: $%i] - [New Money: $%i]",gPlayer[i][gName],i,oldmoney[i],GetPlayerMoney(i));
    for(new j = 0; j < MAX_PLAYERS; j++)
    {
    if(IsPlayerConnected(j) && gPlayer[j][admin] > 0) SM(j, rose, string);
    }
    }
    oldmoney[i] = GetPlayerMoney(i);
    }
    return 1;
}
Reply
#2

im not sure but if u do getplayermoney to check the oldmoney and the player hacked then the check is too late... it will check the money after the person hacked >.>
Reply
#3

Before, i had it on top. But the result was the same :S
Reply
#4

You sure you are not mixing gPlayer[i][money] with oldmoney[i] there?
Reply
#5

What do you mean?
Reply
#6

What he means is that it could be possible that instead of:

pawn Код:
format(string,sizeof(string), "*NOTICE* %s(id: %d) is a suspect of moneyhacking. [Old Money: $%i] - [New Money: $%i]",gPlayer[i][gName],i,oldmoney[i],GetPlayerMoney(i)); // Mention "oldmoney[i]"
You should use:

pawn Код:
format(string,sizeof(string), "*NOTICE* %s(id: %d) is a suspect of moneyhacking. [Old Money: $%i] - [New Money: $%i]",gPlayer[i][gName],i,gPlayer[i][money],GetPlayerMoney(i)); //Mention the 'gPlayer[i][money]'
Reply
#7

Ahh, didn't see. Thanks
Reply
#8

pawn Код:
if((GetPlayerMoney(i)-50000 >= gPlayer[i][money]) && IsPlayerConnected(i))

->

if(IsPlayerConnected(i) && oldmoney[i] <= (GetPlayerMoney(i) - 50000))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)