Anti-Cheat System - Need help - 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-Cheat System - Need help (
/showthread.php?tid=238782)
Anti-Cheat System - Need help -
sim_sima - 12.03.2011
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.
Re: Anti-Cheat System - Need help -
Sasino97 - 12.03.2011
try SetTimerEx( "CheatCheck" not CheatCheck
pawn Код:
Timer[playerid] = SetTimerEx(playerid, "CheatCheck", 1000, 1, "i", playerid);
Re: Anti-Cheat System - Need help -
sim_sima - 12.03.2011
Makes no difference
Re: Anti-Cheat System - Need help -
cessil - 12.03.2011
pawn Код:
SetTimerEx("CheatCheck", 1000, 1, "i", playerid);