12.03.2011, 11:12
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):
(Line 90 - 95):
And a custom public function:
(Line 40 - 67):
But the compiller gives me this error:
Hope someone can help. Thank you.
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;
pawn Код:
public OnPlayerConnect(playerid)
{
KillTimer(Timer[playerid]);
Timer[playerid] = SetTimerEx(playerid, CheatCheck, 1000, 1, "i", playerid);
return 1;
}
(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);
}
}
}
}
Код:
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.