Problem With AntiCheat
#1

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;
}

Reply
#2

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.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)