Anti money hack notify. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti money hack notify. (
/showthread.php?tid=179695)
Anti money hack notify. -
Seven. - 28.09.2010
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;
}
Re: Anti money hack notify. -
Mike_Peterson - 28.09.2010
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 >.>
Re: Anti money hack notify. -
Seven. - 28.09.2010
Before, i had it on top. But the result was the same :S
Re: Anti money hack notify. -
Finn - 29.09.2010
You sure you are not mixing
gPlayer[i][money] with
oldmoney[i] there?
Re: Anti money hack notify. -
Seven. - 29.09.2010
What do you mean?
Re: Anti money hack notify. -
Hiddos - 29.09.2010
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]'
Re: Anti money hack notify. -
Seven. - 29.09.2010
Ahh, didn't see. Thanks
Re: Anti money hack notify. -
Finn - 29.09.2010
pawn Код:
if((GetPlayerMoney(i)-50000 >= gPlayer[i][money]) && IsPlayerConnected(i))
->
if(IsPlayerConnected(i) && oldmoney[i] <= (GetPlayerMoney(i) - 50000))