littlewhitey's Servers Forum (SA-MP/VC-MP/MTA/Zomboid)

SA-MP Server - 54.38.156.202:7777 => General => Topic started by: Matheus_MK3 on March 06, 2009, 07:00:35 PM

Title: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Matheus_MK3 on March 06, 2009, 07:00:35 PM
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.

Code: [Select]
#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!
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Slice on March 06, 2009, 07:06:50 PM
Wow, they should put you in charge as head developer.
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Faraday on March 06, 2009, 07:41:20 PM
Don't understand a single thing of this, but nice work! :D
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Slice on March 06, 2009, 08:07:46 PM
Don't understand a single thing of this, but nice work! :D

...or not.
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: eDiT on March 06, 2009, 08:08:02 PM
Don't understand a single thing of this, but nice work! :D
Hope your kidding!

One of the most pointless topics I've ever seen!
First off, LW's already has a ping kicker, second you are HORRIBLE at scripting.
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Slice on March 06, 2009, 08:09:27 PM
Don't understand a single thing of this, but nice work! :D
Hope your kidding!

One of the most pointless topics I've ever seen!
First off, LW's already has a ping kicker, second you are HORRIBLE at scripting.

Dude shut up! He's pro!
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: Faraday on March 06, 2009, 08:56:37 PM
Don't understand a single thing of this, but nice work! :D
Hope your kidding!

One of the most pointless topics I've ever seen!
First off, LW's already has a ping kicker, second you are HORRIBLE at scripting.

Like I said, I don't get anything of this so, it's just nice work to see him putting so much effort into something useless :D
Title: Re: [FS]Everyone Server Admin Script v 1.0 by Matheus_MK3
Post by: dannymc18 on March 07, 2009, 07:59:00 AM
http://forum.sa-mp.com