Anti Cheat Bug
#1

Hey,
i made a AntiCheat. Its a bit buggy. When someone get banned because he cheated a weapon, he get banned, but when after the ban a new player joins he get also banned with the same reason. I dont know why, i hope you can help me. Here is the script.

Код:
if(Spieler[playerid][AdminLevel] == 0)
	if(GetPVarInt(playerid,"DMStatus") == 0)
	if(GetPlayerWeapon(playerid) == 45)
	{
	new name[128];
	new string[128];
	GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"Server: %s was banned by AntiBot. Reason: Thermal goggles",name);
	SendClientMessageToAll(COLOR_LIGHTRED,string);
	Ban(playerid);
    new File:bans = fopen("/Server/bans.txt",io_append);
	fwrite(bans,string);
	fclose(bans);
	ResetPlayerWeapons(playerid);
	}
PS: I started "SetTimerEx" when someone connect and kill the timer when someone left. The example is a public.
Reply
#2

ґI suggest to put it under Public OnPlayerUpdate, and if someone gets the weapon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)