All pastes #805835 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-04 18:33 UTC
rendered paste body
#include <a_samp>

new nPlayer[200];
new TimerOn = 0;
forward Evaluate();
public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Bot-Control 0.2 [FS] By Pixels With Khaled Edit^");
        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[256];
                            format(string,sizeof(string),"[Alert!]Bot Found with playerid[%d] and Ping of [%d] and Ip [%d]",i,GetPlayerPing(i),GetPlayerIp(i,"any",50));
                            SendClientMessageToAll(0xFF0000AA,string);
                            nPlayer[i] = 0; //To Make The Timer Restart Aple
                            TimerOn = 0; //To Make The Timer Restart Aple
                        }
                        else
                        {
                        //No Bot Found
                                nPlayer[i] = 0;
                                TimerOn = 0;
                        }
                }
        }
        return 1;
}