An Basic Server Admin Script, kick people with the ping over definition and alerts when anyone enter/leave server...
It can be implemented as filterscript...
It cannot be distributed at any cost, its free and need to continue free.
#include <a_samp>
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define colora 0xFFFF00AA //Bans, Kicks and etc color...
#define colorb 0x33AA33AA //Connect, Disconect and etc color...
new maxping = 450;
forward CheckPing(playerid);
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Server Administrator v 1.0 by Matheus_MK3");
print("--------------------------------------\n");
SetTimer("CheckPing(MAX_PLAYERS)", 1000, true);
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public CheckPing(playerid)
{
//Get the player's ping and kick if it's excessive
new ping = GetPlayerPing(playerid);
new name[128];
GetPlayerName(playerid, "name",strlen(name));
if(ping > maxping)
{
new string[128];
Kick(playerid);
format("string",strlen(string),"%d has been kicked by Admin BOT. Reason: Maximum ping exceds limit (Limit : %d / Ping : %d)",name,maxping,ping);
SendClientMessageToAll(colora, string);
}
}
public OnPlayerConnect(playerid)
{
new name[128];
new string[128];
GetPlayerName(playerid, "name",strlen(name));
format("string", strlen(string), "%d (ID %d) has been connected.",name,playerid);
SendClientMessageToAll(colorb, string);
}
public OnPlayerDisconnect(playerid)
{
new name[128];
new string[128];
GetPlayerName(playerid, "name",strlen(name));
format("string", strlen(string), "%d (ID %d) has been disconnected.",name,playerid);
SendClientMessageToAll(colorb, string);
}
hehe, i created it from 0... Have fun!