Anti-Cheat System - Need help
#1

Hello guys. Im makeing (or trying to make) an anti-cheat system for my server.
My server is using dini for user stat saveing.
My anti-cheat script looks like this so far:
At the top of my script:
(Line 11 - 12):
pawn Код:
new Timer[MAX_PLAYERS];
new Count = 5;
(Line 90 - 95):
pawn Код:
public OnPlayerConnect(playerid)
{
    KillTimer(Timer[playerid]);
    Timer[playerid] = SetTimerEx(playerid, CheatCheck, 1000, 1, "i", playerid);
    return 1;
}
And a custom public function:
(Line 40 - 67):
pawn Код:
forward CheatCheck(playerid);

public CheatCheck(playerid)
{
    new name[MAX_PLAYER_NAME], file[128];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), UserFile, name);
    Count--;
    if(dini_Exists(file))
    {
        if(Count == 0)
        {
            if(dini_Int(file, "Money") > GetPlayerMoney(playerid))
            {
                new string[44];
                GetPlayerName(playerid, name, sizeof(name));
                format(string, sizeof(string), "( ! ) %s has been banned by the server for: Dollar Cheat",name);
                SendClientMessageToAll(COLOR_SYSTEMRED, string);
                SendClientMessage(playerid, COLOR_SYSTEMRED, "( ! ) You are banned by the server for: Dollar Cheat");
                Ban(playerid);
            }
            else
            {
                SetTimerEx(playerid, CheatCheck, 1000, 1, "i", playerid);
            }
        }
    }
}
But the compiller gives me this error:
Код:
C:\Users\Simon\Desktop\samp server rpg\filterscripts\Untitled.pwn(63) : error 035: argument type mismatch (argument 1)
C:\Users\Simon\Desktop\samp server rpg\filterscripts\Untitled.pwn(93) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Hope someone can help. Thank you.
Reply
#2

try SetTimerEx( "CheatCheck" not CheatCheck

pawn Код:
Timer[playerid] = SetTimerEx(playerid, "CheatCheck", 1000, 1, "i", playerid);
Reply
#3

Makes no difference
Reply
#4

pawn Код:
SetTimerEx("CheatCheck", 1000, 1, "i", playerid);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)