help | money anti cheat...
#1

i have this on top of the mode:
pawn Code:
new nmoney[MAX_PLAYERS];
when player leaves the server:
pawn Code:
nmoney[playerid] = 0;
now, im using this, instead of the regular function:
pawn Code:
stock AC_GivePlayerMoney(playerid, amount)
{
    nmoney[playerid] += amount;
    GivePlayerMoney(playerid, amount);
    return 1;
}
this callback checks if someone is using money cheat every second:
pawn Code:
public Money_Cheat()
{
    for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) if(GetPlayerMoney(i) != nmoney[i])
        Kick(i);
}
now the problem is that i get kick in a second.. even if i don't use money cheat..
thanks for helpers
Reply
#2

Why dont u just
pawn Code:
SetPlayerMoney(i, nmoney);
instead of
pawn Code:
Kick(i);
Reply
#3

can you help me solve the problem?
i want the cheaters will be kick.
Reply
#4

Code:
nmoney[playerid] = 0;
put this to OnPlayerConnect not to OnPlayerDisconnect
Reply
#5

Quote:

undefined symbol "SetPlayerMoney"

Where do you get SetPlayerMoney?
Reply
#6

Quote:
Originally Posted by Chuck_Taylor
Code:
nmoney[playerid] = 0;
put this to OnPlayerConnect not to OnPlayerDisconnect
its the same..
if i put this on OnPlayerDisconnect, when im connecting, its still will be the same value..

someone that knowes can help me please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)