All pastes #805077 Raw Edit

Bot-Control [Pixels^]

public cpp v1 · immutable
#805077 ·published 2007-12-04 01:03 UTC
rendered paste body
#include <a_samp>new nPlayer[200];new TimerOn;forward Evaluate();public OnFilterScriptInit(){	print("\n--------------------------------------");	print("     Bot-Control [FS] By Pixels^");	print("--------------------------------------\n");	return 1;}public OnPlayerConnect(playerid){	nPlayer[playerid] = 1;	if(TimerOn == 0)	{		SetTimer("Evaluate",5000,0);		TimerOn = 1;	}	return 1;}public Evaluate(){	for(new i=0; i<MAX_PLAYERS; i++)	{		if(IsPlayerConnected(i) && nPlayer[i] == 1)		{		    if(GetPlayerPing(i) <= 0)			{			    new string[128];		 		format(string,sizeof(string),"[Alert!] Bot Found with playerid[%d] and ping of [%d]",i,GetPlayerPing(i));				SendClientMessageToAll(0xFF0000AA,string);		 		Kick(i);			}			else			{				nPlayer[i] = 0;				TimerOn = 0;			}		}	}	return 1;}