SA-MP Forums Archive
Problem With AntiCheat - 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: Problem With AntiCheat (/showthread.php?tid=141471)



Problem With AntiCheat - RenisiL - 13.04.2010

Hey, I have one problem, i made AntiCheat system but when player go to the server, player is banned for using of cheat, Server turn off automaticlly

Quote:

public AntiCheatGuardText(playerid)
{
if(Anticheat[Jetpack] == true)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
new str[MAX_STRING];
SendClientMessage(playerid,COLOR_RAUDONA,"[AntiCheat] Tu esi uћblokuotas. (Prieћastis: Jetpack)");
format(str, sizeof(str),"[AntiCheat] %s Yra uћblokuotas. (Prieћastis: Jetpack)",PlayerName(playerid));
SendClientMessageToAll(COLOR_RAUDONA,str);
Ban(playerid);
}
}
if(Anticheat[Ginklas] == true)
{
new Ginklas1, Soviniai;
new str[MAX_STRING];
GetPlayerWeaponData(playerid, 7, Ginklas1, Soviniai);
if(Ginklas1 == 3
{
SendClientMessage(playerid,COLOR_RAUDONA,"[AntiCheat] Tu esi uћblokuotas. (Prieћastis: MiniGun)");
format(str, sizeof(str),"[AntiCheat] %s Yra uћblokuotas. (Prieћastis: MiniGun)",PlayerName(playerid));
SendClientMessageToAll(COLOR_RAUDONA,str);
Ban(playerid);
}
if(Ginklas1 == 36 || Ginklas1 == 35)
{
SendClientMessage(playerid,COLOR_RAUDONA,"[AntiCheat] Tu esi uћblokuotas. (Prieћastis: Rocket Launcher)");
format(str, sizeof(str),"[AntiCheat] %s Yra uћblokuotas. (Prieћastis: Rocket Launcher)",PlayerName(playerid));
SendClientMessageToAll(COLOR_RAUDONA,str);
Ban(playerid);
}
if(Ginklas1 == 39)
{
SendClientMessage(playerid,COLOR_RAUDONA,"[AntiCheat] Tu esi uћblokuotas. (Prieћastis: Satchel Charge's)");
format(str, sizeof(str),"[AntiCheat] %s Yra uћblokuotas. (Prieћastis: Satchel Charge's)",PlayerName(playerid));
SendClientMessageToAll(COLOR_RAUDONA,str);
Ban(playerid);
}
}
if(GetPlayerPing(playerid) > Anticheat[MaxPing])
{
new str[MAX_STRING];
format(str, sizeof(str),"[AntiCheat] %s Yra Iљspyrtas. (Prieћastis: Virљytas ping (MAX) %d",PlayerName(playerid),Anticheat[MaxPing]);
SendClientMessageToAll(COLOR_RAUDONA,str);
Kick(playerid);
}
return 1;
}




Re: Problem With AntiCheat - RichyB - 14.04.2010

What are they being banned for?
This can help find where the bug is coming from.
Also.
If you put Return 1; under Ban(playerid);
It may help.


I am not a Pro Script, but learning.



Re: Problem With AntiCheat - Thrarod - 14.04.2010

Kick them! Even they come back they will get kicked again so ban = kick here and
Quote:
Originally Posted by RichyB
If you put Return 1; under Ban(playerid);
It may help.