
																																		/*
    >>>---------------------------------------<<<
	*	=====================================   *
	*	=      [FS] Andre's Admin 0.8       =   *
	*	=====================================   *
	>>>---------------------------------------<<<
	_____________________________________________

	* Information/guide:

	    * How to install:

			* Un-rar the .rar file with WinRAR or any other program that supports unpacking .rar
			* Put all the files You got into Your SA-MP Server folder
			* Make sure that You have them correctly:
			    * Aadmin.pwn & Aadmin.amx in \gamemodes\
			    * dubd.inc, dutils.inc, dini.inc in \pawno\includes\
			* Open server.cfg file in Your SAMP Server Folder
			* By default You have the line:
			    * "filterscripts", replace it with "filterscripts Aadmin" PS: You might have to leave it as 1st.
			* Open samp-server.exe (Or yom's server restarter)
			* Have fun, edit - Don't claim as Yours.


		* Techincal Information:

		    * .PWN file size: 123KB
		    * .AMX file size: 84KB
		    * Amount of lines: 3692


		* In game features:
		
			* Andre's own PM system
			* Menus to change time or spawn a vehicle
			* Commands: ( Consists of 58 Commands )

				* Regular players commands: (3)
				    * /reg - Register with server
					* /log - log in
					* /report - Report rulebreaker

				* Admins commands: (55)

					Level 1:
					    * /a [text] - Admin chat
					    * /clearchat - Clear the chat
					    * /kick [id] [reason] - Kick someone
					    * /akill [id] - Kill someone
					    * /warn [id] [rsn] - Warn someone
					    * /slap [id] - Slap someone
					    * /seepms - See PMs
					    * /flip [id] - Flip someone
					    * /flipme - Flip Yourself
					    * /freeze [id] - Freeze someone
					    * /unfreeze [id] - Thaw someone
					    * /playerinfo [id] - See info about someone
						* /asay [msg] - Send admin announcement (chat)
						* /ip [id] - See someones IP
				  		* /mute [id] - Mute someone
				  		* /ajail [id] [time] - Mute someone
				  		* /force [id] - Force someone to class selection
					Level 2
					    * /tele [id] [dest. id] - Tele someone to someone
					    * /ban [id] [rsn] - Ban someone
					    * /ann [msg] - Announce (Just text)
					    * /cnn [msg] - Announce (AdminName: Text)
					    * /gun [id] [weaponid] [ammo]
					    * /fuckup [id] - Fuck someone
					    * /tadi [id] - Goto someone
					    * /modi [id] - Get someone to You
					    * /eject [id] - Eject someone from their vehicle
					    * /superslap [id] - Superslap someone
					    * /sethealth [id] [amount] - Set someones health
					    * /broni [id] [amount] - Set someones health
					    * /healall - Heal everyone
					    * /armourall - Armour everyone
					Level 3
					    * /disarm [id] - Disarm
					    * /disarmall - Disarm everyone
					    * /explode [id] - Explode someone
					    * /time - Open time setting menu
						* /weather [id] - Change weather
						* /weatherids - See wheater IDs
						* /getallhere - Get everyone to You
						* /explodeall - Explode everyone
						* /setmoney [id] [amt] - Set someones money
						* /jetpack - Get a jetpack
						* /setname [id] [newname] - Set someone's name
						* /wantedlevel [id] [level] - Set someone's wanted level
					Level 4
					    * /stlvl [id] [level] - Set someones admin level
					    * /restart - GMX the server
					    * /disarmall - Disarm everyone
						* /reloadbans - Reload bans
						* /reloadlogs - Reload logs
						* /mapname [name] - Set server mapname
						* /servername [name] - Set server's name
						* /sexplode [id] - Silent Explode someone
						* /sban [id] [reason] - Silent ban someone
						* /skick [id] [reason] - Silent kick someone
					    
			  		
		* Changelog:
			PS: No older changelogs provided.
			    * 0.8
			        - Fixed /healall flood
			        - Added /slap to command list
			        - Fixed /clearchat levels (Level 4 couldn't do it)
			        - Added menus to: /vehicle & /time
			        - New saving item in system: pPMs (If admin sees players PMs)
			        - The bug with random admins probably fixed
			        - /superslap [id] added (level 2)
					- /seepms added (level 1) with new saving system item
					- /flip [id] added (level 1)
					- /flipme added (level 1)
			        - /cnn added (Announcement with senders name)
			        - /fuckup added (level 2)
			        - /vehicle added (level 3)
			        - /explodeall added (level 3)
			        - /sexplode added (level 4)
			        - /sban added (level 4)
			        - /skick added (level 4)


	<< (C) Copyright 2007, 2008 Andre "Andre9977" Tamm>>

                                                                                                                                                            */
// === [Includes] ===
#include <a_samp>
#include <core>
#include <float>
#include <Dini>
#include <dudb>
#include <dutils>

// === [Some configuring] ===
#define JOIN_MESSAGES false
#define Leavemessages false
#define leavemessagecolor COLOR_RED
#define joinmessagecolor COLOR_RED

// 55 in total (commands)
#define Level1Commands1 "Level 1: /a [text], /clearchat, /kick, /slap, /akill, /warn, /getid, /seepms, /flip" // 9
#define Level1Commands2 ">>>>>>>> /freeze, /unfreeze /playerinfo, /asay, /ip, /mute, /ajail, /force, /flipme" // 9
#define Level2Commands1 "Level 2: /tele, /ban, /ann, /cnn, /gun, /fuckup, /superslap" // 6
#define Level2Commands2 ">>>>>>>> /tadi, /modi, /eject, /hp, /broni, /healall, /armourall" // 7
#define Level3Commands1 "Level 3: /disarm, /disarmall, /explode, /time, /weather [weatherid], /getallhere, /explodeall" // 7
#define Level3Commands2 ">>>>>>>> /setmoney, /jetpack, /setname, /wantedlevel, /vehicle" // 5
#define Level4Commands1 "Level 4: /restart, /disarmall, /reloadbans, /reloadlogs, /mapname, /servername" // 7
#define Level4Commands2 ">>>>>>>> /sexplode, /sban, /skick" // 3

// === [Color Defines] ===
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_BLUE 0x33AAFFFF
#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000FF
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_CYAN 0x00FFFFAA
#define COLOR_SYSTEM 0xEFEFF7AA


// === [Pragma] ===
#pragma unused ret_memcpy

// === [Forward] ===
forward IsStringAName(string[]);
forward GetPlayerID(string[]);
forward SendMessageToAdmins(color,const string[]);
forward Restart();
forward Unjail(giveplayerid);
// === [Loops] ===
new Mute[MAX_PLAYERS];
new level[MAX_PLAYERS];
new freeze[MAX_PLAYERS];
new WarnedTimes[MAX_PLAYERS];
new logged[MAX_PLAYERS];
new SilentBanKick[MAX_PLAYERS];


// === [Menus] ===
new Menu:TimeMenu;
new Menu:AM;
new Menu:PM;
new Menu:Vehicle;


// === [Enum] ===
enum pInfo
{
    pAdmin,
    pPMs,
}

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnFilterScriptInit()
{
	print("  *****************************************************  ");
	print("  *| Andre's Administration Filterscript Version 0.8 |*  ");
	print("  *****************************************************  ");
	
	// Time menu
	TimeMenu = CreateMenu("AdminTime",1,20,120,150,40);
	SetMenuColumnHeader(TimeMenu,0,"Admin Timemenu");
	AddMenuItem(TimeMenu,0,"AM");
	AddMenuItem(TimeMenu,0,"PM");
	
	// AM Menu
	AM = CreateMenu("Time", 1, 20, 120, 150, 40);
	SetMenuColumnHeader(AM,0,"Morning times");
	AddMenuItem(AM, 0, "01 AM");
	AddMenuItem(AM, 0, "02 AM");
	AddMenuItem(AM, 0, "03 AM");
	AddMenuItem(AM, 0, "04 AM");
	AddMenuItem(AM, 0, "05 AM");
	AddMenuItem(AM, 0, "06 AM");
	AddMenuItem(AM, 0, "07 AM");
	AddMenuItem(AM, 0, "08 AM");
	AddMenuItem(AM, 0, "09 AM");
	AddMenuItem(AM, 0, "10 AM");
	AddMenuItem(AM, 0, "11 AM");
	AddMenuItem(AM, 0, "12 AM");
	
	// PM Menu
	PM = CreateMenu("Time", 1, 20, 120, 150, 40);
	SetMenuColumnHeader(PM,0,"Afternoon times");
	AddMenuItem(PM, 0, "13 PM");
	AddMenuItem(PM, 0, "14 PM");
	AddMenuItem(PM, 0, "15 PM");
	AddMenuItem(PM, 0, "16 PM");
	AddMenuItem(PM, 0, "17 PM");
	AddMenuItem(PM, 0, "18 PM");
	AddMenuItem(PM, 0, "19 PM");
	AddMenuItem(PM, 0, "20 PM");
	AddMenuItem(PM, 0, "21 PM");
	AddMenuItem(PM, 0, "22 PM");
	AddMenuItem(PM, 0, "23 PM");
	AddMenuItem(PM, 0, "24 PM");
	
	Vehicle = CreateMenu("AdminVehicles", 1, 20, 120, 150, 40);
	SetMenuColumnHeader(Vehicle, 0, "Vehicle:");
	AddMenuItem(Vehicle, 0, "Quad");
	AddMenuItem(Vehicle, 0, "Vortex");
	AddMenuItem(Vehicle, 0, "RC car");
	AddMenuItem(Vehicle, 0, "Sandking");
	AddMenuItem(Vehicle, 0, "Hydra");
	AddMenuItem(Vehicle, 0, "Infernus");
	AddMenuItem(Vehicle, 0, "Packer");
	AddMenuItem(Vehicle, 0, "Hotring");
	AddMenuItem(Vehicle, 0, "Mower");
	AddMenuItem(Vehicle, 0, "Monster");
	AddMenuItem(Vehicle, 0, "Camper");
	AddMenuItem(Vehicle, 0, "NRG-500");
}
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
	new string[256];
	new PlayerName[MAX_PLAYER_NAME];
	new RecName[MAX_PLAYER_NAME];
	GetPlayerName(recieverid, RecName, sizeof(RecName));
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	if(IsPlayerConnected(recieverid) && IsPlayerConnected(playerid))
	{
		format(string, sizeof(string), "AdmPM: PM from %s to %s: %s", PlayerName, RecName, text);
	 	for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1 && i != playerid && i != recieverid)
			{
			    if(PlayerInfo[i][pPMs] == 1)
			    {
					SendClientMessage(i,  COLOR_CYAN, string);
				}
			}
		}
	    if(Mute[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You can't use PMs while muted. Please /report Your situation when You've been muted too long.");
	    if(recieverid != playerid)
	    {
			GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
			GetPlayerName(recieverid, RecName, sizeof(RecName));
			GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Private message ~r~Sent~y~.", 3000, 3);
			GameTextForPlayer(recieverid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~ Private message ~r~Recieved~y~.", 3000, 3);
			PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
			PlayerPlaySound(recieverid,1057,0.0,0.0,0.0);
			format(string, sizeof(string), "# PM from %s(%i): %s", PlayerName, playerid, text);
			SendClientMessage(recieverid, COLOR_CYAN, string);
			format(string, sizeof(string), "# PM to %s(%i): %s", RecName, recieverid, text);
			SendClientMessage(playerid, COLOR_CYAN, string);
		}
	}
	else
	{
		format(string, sizeof(string), "There isn't anyone connected with ID %i", recieverid);
		SendClientMessage(playerid, COLOR_CYAN, string);
	}
	return 0;

}
// === [OnPlayerText] ===
public OnPlayerText(playerid,text[])
{
    if(Mute[playerid] == 1)
	{
		SendClientMessage(playerid, COLOR_RED, "You can not talk while muted!");
		return 0;
    }
    if(Mute[playerid] == 0)
    {
		if(strfind(text, "Hack", true) == 0)
		{
		    SendClientMessageToAll(COLOR_RED, "Use /report [id] [reason] to report a abusive player!");
		}
		if(strfind(text, "noob", true) == 0)
		{
		    SendClientMessageToAll(COLOR_RED, "Don't flame please!");
		}
		return 1;
	}
	return 0;
}


// === [OnPlayerConnect] ===
public OnPlayerConnect(playerid)
{
	new PlayerName[24];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    if(!dini_Exists(udb_encode(PlayerName)))
	{
		SendClientMessage(playerid, COLOR_BLUE, "You aren't registered, /reg [password]");
	}
	else
	{
		SendClientMessage(playerid, COLOR_BLUE, "You are registered, /log [password]");
	}
	logged[playerid] = 0;
	freeze[playerid] = 0;
	level[playerid] = 0;
	PlayerInfo[playerid][pAdmin] = 0;
	#if JOIN_MESSAGES == true
	format(string, sizeof(string), "%s(%i) has connected the server", PlayerName, playerid);
	SendClientMessageToAll(joinmessagecolor, string);
	#endif
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	#if Leavemessages == true
	new PlayerName[30], string[256];
	switch (reason)
	{
 		case 0:
    	{
    	    if(SilentBanKick[playerid] == 0)
    	    {
				GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
				format(string, 256, "%s(%i) has left the server (Timeout)", PlayerName);
				SendClientMessageToAll(leavemessagecolor, string);
			}
		}
		case 1:
 		{
			if(SilentBanKick[playerid] == 0)
    	    {
				GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
				format(string, 256, "%s(%i) has left the server (Leaving)", PlayerName);
				SendClientMessageToAll(leavemessagecolor, string);
			}
		}
		case 2:
	 	{
			if(SilentBanKick[playerid] == 0)
    	    {
				GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
				format(string, 256, "%s(%i) has left the server (Kicked/banned)", PlayerName);
				SendClientMessageToAll(leavemessagecolor, string);
			}
		}
	}
	#endif
}

// === [OnPlayerCommandText] ===
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256];
	new idx;
	new tmp[256];
	new giveplayer[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];
	new string[256];
	new playername[256];
	new tmp2[256];
	cmd = strtok(cmdtext, idx);
	new giveplayerid;
	if(strcmp(cmd, "/seepms", true) == 0)
	{
	    if(logged[playerid] == 1)
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(PlayerInfo[playerid][pPMs] == 0)
			    {
				    GetPlayerName(playerid, sendername, sizeof(sendername));
				    SendClientMessage(playerid, COLOR_BLUE, "You can now see PMs!");
				    PlayerInfo[playerid][pPMs] = 1;
				    dini_IntSet(udb_encode(sendername), "SeePMs", PlayerInfo[playerid][pPMs]);
				    for(new i=0; i <= MAX_PLAYERS; i++)
					{
					    if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
					    {
							format(string, sizeof(string), "AdmChat: %s(%i) has enabled his PM system. He can see players PMs now.", sendername, playerid);
							SendClientMessage(i, COLOR_BLUE, string);
						}
					}
				}
				else
				{
                    GetPlayerName(playerid, sendername, sizeof(sendername));
				    PlayerInfo[playerid][pPMs] = 0;
				    dini_IntSet(udb_encode(sendername), "SeePMs", PlayerInfo[playerid][pPMs]);
				    for(new i=0; i <= MAX_PLAYERS; i++)
					{
					    if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
					    {
							format(string, sizeof(string), "AdmChat: %s(%i) has disabled his PM system. He can't see players PMs anymore.", sendername, playerid);
							SendClientMessage(i, COLOR_BLUE, string);
						}
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_CYAN, "You are not authorized to use this command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Getid] ===
	if(strcmp(cmd,"/getid",true) == 0 || strcmp(cmd, "/id", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /getid [part from the nick]");
			return 1;
		}
		format(string,sizeof(string),"Searched for: \"%s\": ",tmp);
		SendClientMessage(playerid,COLOR_RED,string);
		new found=0;
		for(new i=0; i <= MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
		  		new foundname[MAX_PLAYER_NAME];
		  		GetPlayerName(i, foundname, MAX_PLAYER_NAME);
				new namelen = strlen(foundname);
				new bool:searched=false;
		    	for(new pos=0; pos <= namelen; pos++)
				{
					if(searched != true)
					{
						if(strfind(foundname,tmp,true) == pos)
						{
			                found++;
							format(string,sizeof(string),"%d. %s (ID %d)",found,foundname,i);
							SendClientMessage(playerid, COLOR_GREEN ,string);
							searched = true;
						}
					}
				}
			}
		}
		return 1;
	}
// === [Register] ===
	if(strcmp(cmd, "/reg", true) == 0)
	{
	    tmp = strtok(cmdtext, idx);
 		GetPlayerName(playerid, playername, sizeof(playername));
        if(20 < strlen(tmp) || strlen(tmp) < 4)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Error! Password has to be longer than 4 & Shorter than 20 symbols!");
			return 1;
		}
	    if(!strlen(tmp))
	    {
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /reg [password] ~ Will make You registered with the server!");
		}
		else
		{
			if (!dini_Exists(udb_encode(playername)))
			{
				dini_Create(udb_encode(playername));
				dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
				dini_Set(udb_encode(playername),"pass",tmp);
    			PlayerInfo[playerid][pAdmin] = 0;
		    	dini_IntSet(udb_encode(playername), "level", PlayerInfo[playerid][pAdmin]);
				format(string, sizeof(string), "%s(%i) registered with password \"%s\"", playername, playerid, tmp);
				printf(string);
				format(string, sizeof(string), "Created account %s with password \"%s\". Please remember Your password!", playername, tmp);
				SendClientMessage(playerid, COLOR_PURPLE, string);
				SendClientMessage(playerid, COLOR_PURPLE, "Logged in!");
				logged[playerid] = 1;
				PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "A error has occured while attempting to register with the server!");
				format(string, sizeof(string), "Username %s is already registered on this server!", playername,tmp);
				SendClientMessage(playerid, COLOR_RED, string);
			}
		}

		return 1;
	}
// === [Login] ===
	if(strcmp(cmd, "/log", true) == 0)
	{
		if(logged[playerid] == 1)
		{
		    SendClientMessage(playerid, COLOR_RED, "You already are logged in!");
		    return 1;
		}
	    tmp = strtok(cmdtext, idx);
 		GetPlayerName(playerid, playername, sizeof(playername));
	    if(!strlen(tmp))
	    {
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /log [password]");
		}
		else
		{
			if(dini_Exists(udb_encode(playername)))
			{
			    if(logged[playerid] == 0)
			    {
					tmp2 = dini_Get(udb_encode(playername), "password");
			  		if(udb_hash(tmp) != strval(tmp2))
	  				{
	  				    new PlayerName[24];
	  				    GetPlayerName(playerid, PlayerName, 30);
	  				    format(string, sizeof(string), "Error! You have specified the wrong password for %s", PlayerName);
	  				    SendClientMessage(playerid, COLOR_RED, string);
					}
					else
					{
						logged[playerid] = 1;
						dini_Set(udb_encode(playername),"pass",tmp);
		                PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(playername), "level");
		                PlayerInfo[playerid][pPMs] = dini_Int(udb_encode(playername), "SeePMs");
		                GameTextForPlayer(playerid, "~b~Successfully logged in!",2000,1);
		                PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
		                if(PlayerInfo[playerid][pAdmin] == 0)
		                {
		                    new PlayerName[24];
	  				    	GetPlayerName(playerid, PlayerName, 30);
	  				    	format(string, sizeof(string), "Logged in as: %s, Regular member", PlayerName);
	  				    	SendClientMessage(playerid, COLOR_CYAN, string);
	  				    	PlayerInfo[playerid][pAdmin] = 0;
	  				    	dini_IntSet(udb_encode(playername), "level", PlayerInfo[playerid][pAdmin]);
						}
		                if(PlayerInfo[playerid][pAdmin] == 1)
                  		{
                    		new PlayerName[24];
	  				    	GetPlayerName(playerid, PlayerName, 30);
	  				    	format(string, sizeof(string), "Logged in as: %s, Admin level 1 (moderator)", PlayerName);
	  				    	SendClientMessage(playerid, COLOR_CYAN, string);
						}
						if(PlayerInfo[playerid][pAdmin] == 2)
                  		{
                    		new PlayerName[24];
	  				    	GetPlayerName(playerid, PlayerName, 30);
	  				    	format(string, sizeof(string), "Logged in as: %s, Admin level 2 (administrator)", PlayerName);
	  				    	SendClientMessage(playerid, COLOR_CYAN, string);
						}
						if(PlayerInfo[playerid][pAdmin] == 3)
                  		{
                    		new PlayerName[24];
	  				    	GetPlayerName(playerid, PlayerName, 30);
	  				    	format(string, sizeof(string), "Logged in as: %s, Admin level 3 (Head administrator)", PlayerName);
	  				    	SendClientMessage(playerid, COLOR_CYAN, string);
						}
						if(PlayerInfo[playerid][pAdmin] == 4)
						{
						    new PlayerName[24];
	  				    	GetPlayerName(playerid, PlayerName, 30);
	  				    	format(string, sizeof(string), "Logged in as: %s, Admin level 4 (Server Owner)", PlayerName);
	  				    	SendClientMessage(playerid, COLOR_CYAN, string);
						}
						return 1;
					}
				}
			}
			else
			{
			    format(string, sizeof(string), "The account %s, does not exist on this server", playername);
				SendClientMessage(playerid, COLOR_RED, string);
				SendClientMessage(playerid, COLOR_RED, "Please use /reg (password) to register an account!");
			}
		}

		return 1;
	}
// === [Adminhelp] ===
	if(strcmp(cmd, "/adminhelp", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    if(logged[playerid] == 1)
	    {
		    if(PlayerInfo[playerid][pAdmin] >= 1)
		    {
		        new PlayerName[30];
		        GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /adminhelp & succeeded - The player is admin!", PlayerName);
				if(PlayerInfo[playerid][pAdmin] == 1)
				{
					SendClientMessage(playerid, COLOR_RED, ">>-+== Level 1 Admin commands =====================================================================================");
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
				}
				if(PlayerInfo[playerid][pAdmin] == 2)
				{
				    SendClientMessage(playerid, COLOR_RED, ">>-+== Level 2 Admin commands =====================================================================================");
			 		SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
				}
				if(PlayerInfo[playerid][pAdmin] == 3)
				{
				    SendClientMessage(playerid, COLOR_RED, ">>-+== Level 3 Admin commands =====================================================================================");
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level3Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level3Commands2);
				}
				if(PlayerInfo[playerid][pAdmin] == 4)
				{
				    SendClientMessage(playerid, COLOR_RED, ">>-+== Level 4 Admin commands =====================================================================================");
				    SendClientMessage(playerid, COLOR_YELLOW, Level1Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level1Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level2Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level3Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level3Commands2);
					SendClientMessage(playerid, COLOR_YELLOW, Level4Commands1);
					SendClientMessage(playerid, COLOR_YELLOW, Level4Commands2);
				}
				return 1;
			}
			else
			{
			    new PlayerName[30];
			    GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /adminhelp & FAILED - The player isn't admin", PlayerName);
	   			SendClientMessage(playerid, COLOR_CYAN, "You are not authorized to use this command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	}
	if(strcmp(cmd, "/wantedlevel", true) == 0 || strcmp(cmd, "/wanted", true) == 0)
	{
 		GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new wlevel, leveladd[256];
		tmp = strtok(cmdtext, idx);
		leveladd = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /wanted(level) [playerid] [level (0-6)]");
		}
		giveplayerid = strval(tmp);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /wanted(level) [playerid] [level (0-6)]");
		}
		wlevel = strval(tmp);
  		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  		if(logged[playerid] == 1)
  		{
  		    if(PlayerInfo[playerid][pAdmin] >= 3)
  		    {
  		        if(IsPlayerConnected(giveplayerid))
  		        {
  		            if(wlevel >=0 || wlevel  <=6)
					{
						SendClientMessage(playerid, COLOR_RED, "Wanted level syntax: 0 - 6");
					}
					format(string, sizeof(string), "AdmCMD: You have set %s(%i)'s wanted level to %d", giveplayer, giveplayerid, wlevel);
					SendClientMessage(playerid, COLOR_BLUE, string);
					format(tmp, sizeof(tmp), "AdmCMD: %s(%i) has set Your wanted level to %d", sendername, playerid, wlevel);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					SetPlayerWantedLevel(giveplayerid, wlevel);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/servername", true) == 0)
	{
		GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_DBLUE,"Correct Usage: /servername [new name]");
	    if(logged[playerid] == 1)
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 4)
	        {
	            format(tmp,sizeof(tmp),"hostname %s",cmdtext[11]);
	            SendRconCommand(tmp);
	            GetPlayerName(playerid, sendername, sizeof(sendername));
	            format(string, sizeof(string), "AdmCMD: %s(%i) has changed server name to: %s",sendername, playerid, cmdtext[11]);
	            SendClientMessageToAll(COLOR_BLUE,string);
	        }
	        else
	        {
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	        }
	    }
	    else
	    {
	        SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
	    }
	    return 1;
	}
	if(strcmp(cmd, "/mapname", true) == 0)
	{
 		GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE,"Correct Usage: /mapname [new name]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 4)
		    {
				format(tmp,sizeof(tmp),"mapname %s",cmdtext[8]);
				SendRconCommand(tmp);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has changed maps name to: %s",sendername, playerid, cmdtext[8]);
				SendClientMessageToAll(COLOR_BLUE,string);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Explode] ===
	if(strcmp(cmd, "/explode", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /explode [playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					format(string, sizeof(string), "AdmCMD: %s was exploded by %s",giveplayer, sendername);
					SendClientMessageToAll(COLOR_BLUE, string);
					SetPlayerHealth(giveplayerid, 10);
					new Float:boomx, Float:boomy, Float:boomz;
					GetPlayerPos(giveplayerid,boomx, boomy, boomz);
					CreateExplosion(boomx, boomy , boomz, 7, 10);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /explode to explode %s", PlayerName, giveplayer);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/explodeall", true) == 0)
	{
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		new Float:boomx, Float:boomy, Float:boomz;
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    for(new i = 0; i < MAX_PLAYERS; i++)
			    {
			        if(IsPlayerConnected(i))
			        {
						format(string, sizeof(string), "AdmCMD: Everyone was exploded by %s(%i)", sendername, playerid);
						SendClientMessageToAll(COLOR_BLUE, string);
						SetPlayerHealth(giveplayerid, 10);
						GetPlayerPos(i, boomx, boomy, boomz);
						CreateExplosion(boomx, boomy , boomz, 7, 10);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /explode to explode everyone", PlayerName);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/fuckup", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /explode [playerid]");
	    giveplayerid = strval(tmp);
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 2)
		    {
		        if(IsPlayerConnected(playerid))
		        {
		            format(string, sizeof(string), "AdmCMD: %s(%i) was fucked up by %s(%i)", giveplayer, giveplayerid, sendername, playerid);
					SendClientMessageToAll(COLOR_BLUE, string);
					format(string, sizeof(string), "AdmCMD: %s(%i) has fucked you up.", sendername, playerid);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					SetPlayerArmour(playerid, 0.0);
					SetPlayerHealth(playerid, 1.0);
					ResetPlayerWeapons(playerid);
					ResetPlayerMoney(playerid);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/setname", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new tmpp[256];
		tmpp = strtok(cmdtext, idx);
		if(!strlen(tmpp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /setname [playerid] [new nick]");
			return 1;
		}
		giveplayerid = strval(tmpp);
		tmp = strtok(cmdtext, idx);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 3)
		    {
		        if(IsPlayerConnected(giveplayerid))
		        {
					format(string, sizeof(string), "AdmCMD: You have changed %s(%i)'s name to %s", giveplayerid, tmp);
					SendClientMessage(playerid, COLOR_BLUE, string);
					SetPlayerName(giveplayerid, tmp);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	  	return 1;
  	}
// === [Asay] ===
	if(strcmp(cmd, "/asay", true) == 0)
	{
		GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new length = strlen(cmdtext);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[64];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = cmdtext[idx];
			idx++;
		}
		result[idx - offset] = EOS;
		if(!strlen(result) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /asay [text]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				format(string, sizeof(string), "Admin %s: %s", sendername, result);
				SendClientMessageToAll(COLOR_BLUE,string);
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /asay to send the message: %s", PlayerName, result);
	     	}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Goto] ===
 	if(strcmp(cmd, "/tadi", true) == 0)
	{
		GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /tadi [playerid]");
			return 1;
		}
		new Float:plocx,Float:plocy,Float:plocz;
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "AdmCMD: You teleported Yourself to %s(%i)", giveplayer, giveplayerid);
					SendClientMessage(playerid, COLOR_BLUE, string);
					GetPlayerPos(giveplayerid, plocx, plocy, plocz);
					new intid = GetPlayerInterior(giveplayerid);
					SetPlayerInterior(playerid,intid);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /tadi to go to %s", PlayerName, giveplayer);
					if (GetPlayerState(playerid) == 2)
					{
						new tmpcar = GetPlayerVehicleID(playerid);
						SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
					}
					else
					{
							SetPlayerPos(playerid,plocx,plocy+2, plocz);
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Gethere] ===
	if(strcmp(cmd, "/modi", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /modi [playerid]");
			return 1;
		}
		new Float:plocx,Float:plocy,Float:plocz;
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
				    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "AdmCMD: You were teleported to %s(%i)",sendername,playerid);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					format(string, sizeof(string), "AdmCMD: You teleported %s(%i) to Yourself", giveplayer, giveplayerid);
					SendClientMessage(playerid, COLOR_BLUE, string);
					GetPlayerPos(playerid, plocx, plocy, plocz);
					new intid = GetPlayerInterior(playerid);
					SetPlayerInterior(giveplayerid,intid);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /modi to get %s", PlayerName, giveplayer);

					if (GetPlayerState(giveplayerid) == 2)
					{
						new tmpcar = GetPlayerVehicleID(giveplayerid);
						SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
					}
					else
					{
							SetPlayerPos(giveplayerid,plocx,plocy+2, plocz);
					}
				}
				else
				{
	                format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
            SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === {Getall] ===
	if(strcmp(cmd, "/getallhere", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    for(new i = 0; i < MAX_PLAYERS; i ++)
			    {
			        if(IsPlayerConnected(i))
			        {
						format(string, sizeof(string), "AdmCMD: %s has teleported everyone to himself", sendername);
						SendClientMessage(i, COLOR_BLUE, string);
						new Float:ix, Float:iy, Float:iz;
						GetPlayerPos(playerid, ix, iy, iz);
						SetPlayerInterior(i, GetPlayerInterior(playerid));
						SetPlayerPos(i, ix, iy, iz+1);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /getallhere to get all", PlayerName);
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Time] ===
	if(strcmp(cmd, "/time", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
				ShowMenuForPlayer(TimeMenu, playerid);
				TogglePlayerControllable(playerid, 0);
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/vehicle", true) == 0 || strcmp(cmd, "/getcar", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
	    		ShowMenuForPlayer(Vehicle,playerid);
	    		TogglePlayerControllable(playerid, 0);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Weather] ===
	if(strcmp(cmd, "/weather", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /weather [weather]");
			SendClientMessage(playerid, COLOR_DBLUE, "Weather IDs: /weatherids");
			return 1;
		}
		new weather;
		weather = strval(tmp);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
	            SetWeather(weather);
				format(string, sizeof(string), "AdmCMD: Admin %s set the weather to: %d",sendername,weather);
				SendClientMessageToAll(COLOR_BLUE, string);
				SendClientMessage(playerid, COLOR_DBLUE, "See wheater IDs at: /weatherids");
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /weather to set weather to: %s", PlayerName, weather);
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Weatherids] ===
 	if(strcmp(cmd, "/weatherids", true) == 0 || strcmp(cmd, "/weathers", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(PlayerInfo[playerid][pAdmin] >= 3)
		{
			SendClientMessage(playerid, COLOR_RED, ">>+-=================================== [Weather Ids: ] ================================");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 1 - Blue | 2 - Lighter Blue | 3 - Light (No color) | 4 - Even more lighter");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 5 - Normal Sun | 7 - (My PC = Beeped) | 8 - Rainy | 9 - Foggy | 10 - Standard weather");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 12 - Colourless, with alittle fog | 13 - Less foggy  | 15 - Little fog ");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 16 - Rainy | 17 - Hot | 19 - Sandstorm | 20 - Dark | 21 - Some very wierd weather ");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 23 - Atmosphere style (?) | 25 - Abit foggy | 27 - Abit \"White\" | 30 - Thunderstorm ");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 32 - Foggy | 33 - Hot | 35 - City weather | 37 - Warm | 38 - Even more city weather ");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 39 - Industrial weather | 40 - Yellow weather | 42 - Black fog | 43 - Industrial fog ");
			SendClientMessage(playerid, COLOR_YELLOW, ">>| 44 & 45 - Some wierd weather. -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- (c) IDs by PaoloP");
			SendClientMessage(playerid, COLOR_RED, ">>+-====================================================================================");
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
		}
		return 1;
	}
	if(strcmp(cmd,"/report",true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /report [id] [reason]");
			return 1;
		}
		giveplayerid = strval(tmp);
		if(IsPlayerConnected(giveplayerid))
		{
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' ')) {
				idx++;
				}
				new offset = idx;
				new result[64];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
				result[idx - offset] = cmdtext[idx];
				idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid,COLOR_WHITE,"SERVER: /report [id] [reason]");
					return 1;
				}
				GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
				format(string,sizeof(string),"AdmReport: Report on %s (id %d) by %s (id %d). [reason: %s]", giveplayer, giveplayerid, sendername, playerid,result);
				for(new i=0;i<MAX_PLAYERS;i++)
				{
					if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] >= 1)
					{
						SendClientMessage(i,COLOR_RED,string);
					}
				}
		}
		else
		{
			format(string, sizeof(string), "%d is not an active player.", giveplayerid);
			SendClientMessage(playerid, COLOR_RED, string);
		}
		return 1;
	}
// === [Slap] ===
 	if(strcmp(cmd, "/slap", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /slap [playerid]");
			return 1;
		}
		new Float:health;
		new Float:px, Float:py, Float:pz;
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					GetPlayerHealth(giveplayerid, health);
					SetPlayerHealth(giveplayerid, health-5);
					GetPlayerPos(giveplayerid, px, py, pz);
					SetPlayerPos(giveplayerid, px, py, pz+5);
					format(string, sizeof(string), "AdmCMD: %s was slapped by %s",giveplayer, sendername);
					SendClientMessageToAll(COLOR_BLUE, string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /slap to slap %s", PlayerName, giveplayer);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [SuperSlap] ===
 	if(strcmp(cmd, "/superslap", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /SuperSlap [playerid]");
			return 1;
		}
		new Float:px, Float:py, Float:pz;
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					GetPlayerPos(giveplayerid, px, py, pz);
					SetPlayerPos(giveplayerid, px, py, pz+90);
					format(string, sizeof(string), "AdmCMD: %s was SUPERslapped by %s",giveplayer, sendername);
					SendClientMessageToAll(COLOR_BLUE, string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /superslap to superslap %s", PlayerName, giveplayer);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Reloadbans] ===
	if(strcmp(cmd,"/reloadbans",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] == 4)
		    {
				SendClientMessage(playerid, COLOR_RED, "You have successfully re-loaded bans!");
				SendRconCommand("reloadbans");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Reloadlogs] ===
	if(strcmp(cmd,"/reloadlogs",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] == 4)
			{
				SendRconCommand("reloadlogs");
				SendClientMessage(playerid, COLOR_RED, "You have successfully re-loaded logs!");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd,"/loadfs",true) == 0)
	{
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /loadfs [filterscript name]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] == 4)
			{
				format(string,sizeof(string),"loadfs %s",tmp);
				SendRconCommand(string);
				format(string,sizeof(string),"AdmCMD: If the name You've entered for the FS, %s.amx is loaded",tmp);
				SendClientMessage(playerid,COLOR_BLUE,string);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}

	if(strcmp(cmd,"/unloadfs",true) == 0)
	{
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /unloadfs [filterscript name]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] == 4)
		    {
				format(string,sizeof(string),"unloadfs %s",tmp);
				SendRconCommand(string);
				format(string,sizeof(string),"AdmCMD: If the name You've entered for the FS, %s.amx is unloaded",tmp);
				SendClientMessage(playerid,COLOR_BLUE,string);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}

	if(strcmp(cmd,"/changemode",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /changemode [mode name]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] == 4)
		    {
				format(string,sizeof(string),"changemode %s",tmp);
				SendRconCommand(string);
				format(string,sizeof(string),"AdmCMD: Trying to change mode to %s...",tmp);
				SendClientMessage(playerid,COLOR_BLUE,string);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Giveweapon] ===
    if(strcmp(cmd,"/gun",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new weaponid;
		new giveammo;
		tmp = strtok(cmdtext, idx);
		if(logged[playerid] == 0)
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE,"Correct Usage: /gun [id] [weaponid] [ammo]");
			return 1;
		}
        giveplayerid = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE,"Correct Usage: /gun [id] [weaponid] [ammo]");
			return 1;
		}
		weaponid = strval(tmp);
		if(weaponid < 0 || weaponid > 46)
		{
		    SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid weapon ID.");
		    return 1;
		}
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			giveammo = 100000;
		}
		giveammo = strval(tmp);
		if(giveammo < 0 || giveammo > 100000)
		{
		    SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid ammo.");
		    return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					GivePlayerWeapon(giveplayerid, weaponid, giveammo);
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new weaponname[20];
					GetWeaponName(weaponid, weaponname, sizeof(weaponname));
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					format(string,sizeof(string),"AdmCMD: You gave %s \"%s\" with %d ammo",giveplayer, weaponname, giveammo);
					SendClientMessage(playerid, COLOR_BLUE, string);
					format(string,sizeof(string),"AdmCMD: Admin %s gave you \"%s\" with %d ammo",sendername, weaponname, giveammo);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
            SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Eject] ===
	if(strcmp(cmd,"/eject",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /eject [playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(playerid, sendername, sizeof(sendername));
	    GetPlayerName(giveplayerid, giveplayer, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    if(IsPlayerInAnyVehicle(giveplayerid))
				    {
				        RemovePlayerFromVehicle(giveplayerid);
				        format(string, sizeof(string), "Administrator %s has ejected You!", sendername);
				        SendClientMessage(giveplayerid, COLOR_RED, string);
				        format(string, sizeof(string), "AdmCMD: %s has been ejected by %s", giveplayer, sendername);
				        SendClientMessageToAll(COLOR_BLUE, string);
				        new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /eject to eject %s", PlayerName, giveplayer);
				        return 1;
					}
					else
					{
						format(string, sizeof(string), "Error! %s isn't in a vehicle!");
						SendClientMessage(playerid, COLOR_RED, string);
						return 1;
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}

		return 1;
	}
// === [Sethealth] ===
	if(strcmp(cmd,"/hp",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new health;
		GetPlayerName(playerid, sendername, sizeof(sendername));
		GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /hp [id] [health]");
			return 1;
		}
		giveplayerid = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /hp [id] [health]");
			return 1;
		}
		health = strval(tmp);
		if(health < 0 || health > 100)
		{
		    SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid health.");
		    return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
	    			SetPlayerHealth(giveplayerid,health);
	    			GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
					format(string,sizeof(string),"AdmCMD: You have been set %s 's health to %d",giveplayer, health);
					SendClientMessage(playerid,COLOR_RED,string);
					format(string,sizeof(string),"AdmCMD: Admin %s set your health to %d",sendername, health);
					SendClientMessage(giveplayerid,COLOR_RED,string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /hp to set %s's health to: %d", PlayerName, giveplayer, health);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/force", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if	(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GREEN, "USAGE: /force [playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 1)
		    {
		        if(IsPlayerConnected(giveplayerid))
		        {
					format(string, sizeof(string), "AdmCMD: You have forced %s(%i) to class selection", giveplayer, giveplayerid);
					SendClientMessage(playerid, COLOR_BLUE, string);
					SetPlayerHealth(giveplayerid, 0.0);
					ForceClassSelection(giveplayerid);
					format(string, sizeof(string), "AdmCMD: %s(%i) has forced You to class selection", sendername, playerid);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/flip", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /flip [playerid]");
	    giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 1)
		    {
		        if(IsPlayerConnected(giveplayerid))
		        {
		            if(IsPlayerInAnyVehicle(giveplayerid))
		            {
		                new Float:X, Float:Y, Float:Z;
						SetCameraBehindPlayer(giveplayerid);
						GetPlayerPos(giveplayerid, X, Y, Z);
		                SetVehiclePos(GetPlayerVehicleID(giveplayerid), X, Y, Z);
		                SetVehicleZAngle(GetPlayerVehicleID(giveplayerid), 0);
		                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		                format(string, sizeof(string), "AdmCMD: You have flipped %s(%i)", giveplayer, giveplayerid);
					}
					else
					{
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					    format(string, sizeof(string), "Error! %s(%i) isn't in a vehicle!", giveplayer, giveplayerid);
					    SendClientMessage(playerid, COLOR_RED, string);
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/flipme", true) == 0)
	{
	    new Float:X, Float:Y, Float:Z;
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 1)
			{
   				if(IsPlayerInAnyVehicle(playerid))
   				{
					SetCameraBehindPlayer(playerid);
					GetPlayerPos(playerid, X, Y, Z);
	                SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
	                SetVehicleZAngle(GetPlayerVehicleID(playerid), 0);
				}
				else
				{
				   	SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle!");
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/fix", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 1)
			{
   				if(IsPlayerInAnyVehicle(playerid))
   				{
					SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
				}
				else
				{
				   	SendClientMessage(playerid, COLOR_RED, "You must be in a vehicle!");
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/broni", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new armor;
		GetPlayerName(playerid, sendername, sizeof(sendername));
		GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /broni [id] [armor]");
			return 1;
		}
		giveplayerid = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_DBLUE,"Correct Usage: /broni [id] [armor]");
			return 1;
		}
		armor = strval(tmp);
		if(armor < 0 || armor > 100)
		{
		    SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid armor.");
		    return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
	    			SetPlayerArmour(giveplayerid, armor);
	    			GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
					format(string,sizeof(string),"AdmCMD: You have been set %s 's armour to %d",giveplayer, armor);
					SendClientMessage(playerid,COLOR_RED,string);
					format(string,sizeof(string),"AdmCMD: Admin %s set your armour to %d",sendername, armor);
					SendClientMessage(giveplayerid,COLOR_RED,string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /setarmor to set %s's armor to: %d", PlayerName, giveplayer, armor);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/healall", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    if(logged[playerid] == 1)
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 2)
	        {
	            for(new i = 0; i < MAX_PLAYERS; i ++)
				{
				    if(IsPlayerConnected(i))
				    {
					    SetPlayerHealth(i, 100);
					    format(string, sizeof(string), "AdmCMD: %s has healed everyone", sendername);
					    SendClientMessage(i, COLOR_BLUE, string);
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Playerinfo] ===
	if(strcmp(cmd, "/playerinfo", true) == 0 || strcmp(cmd, "/stats", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /playerinfo [playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		if(logged[playerid] == 0)
		{
			SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(IsPlayerConnected(giveplayerid))
				{
				    new Float:health;
				    new Float:armour;
					new intr = GetPlayerInterior(giveplayerid);
					GetPlayerHealth(giveplayerid,health);
					GetPlayerArmour(giveplayerid,armour);
					new ammo = GetPlayerAmmo(giveplayerid);
					new score = GetPlayerScore(giveplayerid);
					new skin = GetPlayerSkin(giveplayerid);
					new money = GetPlayerMoney(giveplayerid);
					new playerip[256];
					GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
					new ping = GetPlayerPing(giveplayerid);
					if(logged[giveplayerid] == 0)
					{
						format(string, sizeof(string),"Information on player %s (ID: %i)(Player isn't logged in) :",giveplayer, giveplayerid);
						SendClientMessage(playerid, COLOR_BLUE, string);
					}
					else
					{
						format(string, sizeof(string),"Information on player %s (ID: %i) :",giveplayer, giveplayerid);
						SendClientMessage(playerid, COLOR_BLUE, string);
					}
					format(string, sizeof(string), "Health [%.1f] | Armour [%.1f] | Money [%d] | Interior [%d] | IP [%s]",health, armour, money, intr,playerip);
					SendClientMessage(playerid, COLOR_RED,string);
					format(string, sizeof(string), "Ammo [%d] | Score[%d] | Skin [%d] | Ping [%d] | Times Warned: %d",ammo, score, skin, ping, WarnedTimes);
					SendClientMessage(playerid, COLOR_RED,string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /playerinfo to see information on player %s", PlayerName, giveplayer);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	            return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [ Restart ] ===
	if(strcmp(cmd, "/rt", true) == 0 || strcmp(cmd, "/grt", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] == 4)
		    {
		        format(string, sizeof(string), "AdmCMD: %s has restarted the server, please wait");
		        SendClientMessageToAll(COLOR_RED, string);
		        SetTimerEx("Restart", 5000, 0, "i", playerid);
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /restart to restart the server", PlayerName);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [IP] ===
	if(strcmp(cmd, "/ip", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /ip [playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
					new playerip[256];
					GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
					format(string, sizeof(string),"AdmCMD: Checked IP on %s(%i): %s ",giveplayer, giveplayerid, playerip);
					SendClientMessage(playerid, COLOR_BLUE, string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /ip to check %s's IP", PlayerName, giveplayer);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	            return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Givemoney] ===
	if(strcmp(cmd, "/money", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 3)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /money [playerid] [amount]");
			return 1;
		}
		new money;
		giveplayerid = strval(tmp);
		if(logged[playerid] == 0)
		{
			SendClientMessage(playerid, COLOR_RED, "You must be logged in to use this command!");
			return 1;
		}
		tmp = strtok(cmdtext, idx);
		money = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
				GivePlayerMoney(giveplayerid, money);
				format(string, sizeof(string), "AdmCMD: You sent %s(%i) $%d", giveplayer,giveplayerid, money);
				SendClientMessage(playerid,COLOR_BLUE, string);
				format(string, sizeof(string), "AdmCMD: You received $%d from Admin %s", money,sendername);
				SendClientMessage(giveplayerid,COLOR_BLUE, string);
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /money to give %s $%s", PlayerName, giveplayer, money);
			}
			else
			{
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Setmoney] ===
	if(strcmp(cmd, "/setmoney", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 3)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /setmoney [playerid] [amount]");
			return 1;
		}
		new money;
		giveplayerid = strval(tmp);
		if(logged[playerid] == 0)
		{
			SendClientMessage(playerid, COLOR_RED, "You must be logged in to use this command!");
			return 1;
		}
		tmp = strtok(cmdtext, idx);
		money = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    ResetPlayerMoney(giveplayerid);
				GivePlayerMoney(giveplayerid, money);
				format(string, sizeof(string), "AdmCMD: You set %s(%i)'s money to $%d", giveplayer,giveplayerid, money);
				SendClientMessage(playerid,COLOR_BLUE, string);
				format(string, sizeof(string), "AdmCMD: Admin %s has set Your money to %d", sendername, money);
				SendClientMessage(giveplayerid,COLOR_BLUE, string);
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /setmoney to set %s's money to $%s", PlayerName, giveplayer, money);
			}
			else
			{
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Kick] ===
	if(strcmp(cmd,"/kick",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_BLUE, "Correct Usage: /kick [id] [reason]");
			return 1;
		}
        giveplayerid = strval(tmp);
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' ')) {
					idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
					result[idx - offset] = cmdtext[idx];
					idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						result = "No reason";
					}
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					format(string, sizeof(string), "AdmCMD: %s was kicked by admin %s for: %s", giveplayer, sendername, result);
					SendClientMessageToAll(COLOR_BLUE, string);
					Kick(giveplayerid);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /kick to kick %s for: %s", PlayerName, giveplayer, result);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [sKick] ===
	if(strcmp(cmd,"/skick",true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    tmp = strtok(cmdtext, idx);
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		if(!strlen(tmp))
		{
			SendClientMessage(playerid,COLOR_BLUE, "Correct Usage: /skick [id] [reason]");
			return 1;
		}
        giveplayerid = strval(tmp);
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' ')) {
					idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
					result[idx - offset] = cmdtext[idx];
					idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						result = "No reason";
					}
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					SilentBanKick[giveplayerid] = 1;
					Kick(giveplayerid);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /skick to silently kick %s for: %s", PlayerName, giveplayer, result);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/jetpack", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
	    if(logged[playerid] == 1)
	    {
	        if(PlayerInfo[playerid][pAdmin] >= 3)
	        {
	            SetPlayerSpecialAction(playerid, 2);
	            SendClientMessage(playerid, COLOR_BLUE, "AdmCMD: You've created a jetpack!");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
            SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Warn] ===
	if(strcmp(cmd, "/warn", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
	    PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		new str[256];
		tmp = strtok(cmdtext, idx);
		tmp2 = strtok(cmdtext, idx);

		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /warn [PlayerID] [Reason]");
			return 1;
		}
		giveplayerid = strval(tmp);
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(WarnedTimes[giveplayerid] == 0)
				{
					WarnedTimes[giveplayerid]+=1;
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof (sendername));
					format(str, sizeof (str), "AdmCMD: %s was warned by %s for: %s [1/3 Warnings]", giveplayer, sendername, cmdtext[8]);
					SendClientMessageToAll(COLOR_BLUE, str);
					print(str);
					return 1;
				}
				if(WarnedTimes[giveplayerid] == 1)
				{
				    WarnedTimes[giveplayerid]+=1;
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof (sendername));
					format(str, sizeof (str), "AdmCMD: %s was warned by %s for: %s [2/3 Warnings]", giveplayer, sendername, cmdtext[8]);
					SendClientMessageToAll(COLOR_BLUE, str);
					print(str);
					return 1;
				}
				else if(WarnedTimes[giveplayerid] == 2)
				{
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof (sendername));
					format(str, sizeof (str), "AdmCMD: %s was kicked by %s for: %s [3/3 Warnings]", giveplayer, sendername, cmdtext[8]);
					SendClientMessageToAll(COLOR_BLUE, str);
					Kick(giveplayerid);
					return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	}
// === [Freeze] ===
	if(strcmp(cmd, "/freeze", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
        giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(freeze[giveplayerid] == 1)
			        {
			            SendClientMessage(playerid, COLOR_RED, "The player is already frozen!");
			            return 1;
					}
					else
					{
				        freeze[giveplayerid] = 1;
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						TogglePlayerControllable(giveplayerid, 0);
						format(string, sizeof(string), "AdmCMD: %s was frozen by %s.",giveplayer, sendername);
						SendClientMessageToAll(COLOR_BLUE, string);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /freeze to freeze %s", PlayerName, giveplayer);
						return 1;
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_BLUE, string);
				}
			}
			else
			{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Unfreeze] ===
	if(strcmp(cmd, "/unfreeze", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
        giveplayerid = strval(tmp);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /unfreeze [playerid]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(freeze[giveplayerid] == 1)
			        {
		      			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						TogglePlayerControllable(giveplayerid, 1);
						freeze[giveplayerid] = 0;
						format(string, sizeof(string), "AdmCMD: %s was thawed by %s", giveplayer,sendername);
						SendClientMessageToAll(COLOR_BLUE, string);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /unfreeze to unfreeze(thaw) %s", PlayerName, giveplayer);
						return 1;
					}
					else
					{
					    SendClientMessage(playerid, COLOR_RED, "This player can't be thawed, he already is!");
					    return 1;
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Setadmin] ===
	if(strcmp(cmd, "/sta", true) == 0 || strcmp(cmd, "/stlvl", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
		giveplayerid = strval(tmp);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Chatere: /sta [playerid] [level]");
			return 1;
		}
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Chatere: /sta  [playerid] [level]");
			return 1;
		}
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		level[playerid] = strval(tmp);
		if(level[playerid] < 0)
		{
			SendClientMessage(playerid, COLOR_RED, "Arastoria Adminis LeveLI");
            return 1;
		}
		if(level[playerid] > 4)
		{
			SendClientMessage(playerid, COLOR_RED, "Arastoria Adminis LeveLI");
            return 1;
		}
		if(level[playerid] == PlayerInfo[giveplayerid][pAdmin])
		{
            format(string, sizeof(string), "Am Motamashes Ukve Aqvs LeveLI %d Adminis Privilegia.", level[playerid]);
            SendClientMessage(playerid, COLOR_BLUE, string);
            return 1;
		}
		if(logged[playerid] == 1)
		{
			if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(logged[giveplayerid] == 0)
					{
						SendClientMessage(playerid, COLOR_RED, "Es Motamashe Ar Aris Srulyopili Tevri /log paroli!");
						return 1;
					}
					else
					{
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						dini_IntSet(udb_encode(giveplayer), "level", level[playerid]);
						format(string, sizeof(string), "Shen Mieci %s LeVeLI %d Adminis Tanashemte.", giveplayer, level[playerid]);
						SendClientMessage(playerid, COLOR_BLUE, string);
						format(string, sizeof(string), "You were made a level %d admin by %s (id: %d).", level[playerid], sendername, playerid);
						SendClientMessage(giveplayerid, COLOR_BLUE, string);
						PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /sta to set %s ' level to: %d", PlayerName, giveplayer, level[playerid]);
					}
				}
				else
				{
				    format(string, sizeof(string), "%d Es Motamashe Ar Aris OnlineShi.", giveplayerid);
	            	SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Ban] ===
	if(strcmp(cmd,"/ban",true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /ban [id] [reason]");
			return 1;
		}
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' ')) {
					idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
					result[idx - offset] = cmdtext[idx];
					idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						SendClientMessage(playerid, COLOR_RED, "You can only ban with proper reason!");
					}
					else
					{
						GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						format(string, sizeof(string), "AdmCMD: %s was banned by admin %s for: %s", giveplayer, sendername, result);
						SendClientMessageToAll(COLOR_BLUE, string);
						BanEx(giveplayerid, result);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /ban to ban %s for: %s", PlayerName, giveplayer, result);
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [sBan] ===
	if(strcmp(cmd,"/sban",true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /sban [id] [reason]");
			return 1;
		}
		giveplayerid = strval(tmp);
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' ')) {
					idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
					result[idx - offset] = cmdtext[idx];
					idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						result = "No reason";
					}
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					SilentBanKick[giveplayerid] = 1;
					BanEx(giveplayerid, result);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /sban to silently ban %s for: %s", PlayerName, giveplayer, result);
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Mute] ===
	if(strcmp(cmd, "/mute", true) == 0)
	{
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
		tmp = strtok(cmdtext, idx);
		if(IsStringAName(tmp))
		{
			giveplayerid = GetPlayerID(tmp);
		}
		else
		{
			giveplayerid = strval(tmp);
		}
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /mute [ID]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if(IsPlayerConnected(giveplayerid))
				{
					if(Mute[giveplayerid] == 0)
					{
						Mute[giveplayerid] = 1;
						format(string, sizeof(string), "AdmCMD: %s was muted by %s",giveplayer ,sendername);
						SendClientMessageToAll(COLOR_BLUE, string);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /mute to mute %s", PlayerName, giveplayer);
					}
					else
					{
						Mute[giveplayerid] = 0;
						format(string, sizeof(string), "AdmCMD: %s was un-muted by %s",giveplayer ,sendername);
						SendClientMessageToAll(COLOR_BLUE, string);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /mute to unmute %s", PlayerName, giveplayer);
					}
				}
				else
				{
					format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [Announce] ===
	if(strcmp(cmd, "/announce", true) == 0 || strcmp(cmd, "/ann", true) == 0)
	{

        tmp = strtok(cmdtext, idx, strlen(cmdtext));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
 		if (!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 2)
  		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /announce [message]");
 			return 1;
      	}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
	  			format(string, sizeof(string), "~w~%s", tmp);
				GameTextForAll(string, 5000, 3);
				new PlayerName[30];
	 			GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /announce with message: %s", PlayerName, tmp);
			}
	 		else
	  		{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
        return 1;
	}
// === [CNN] ===
	if(strcmp(cmd, "/cnn", true) == 0)
	{

        tmp = strtok(cmdtext, idx, strlen(cmdtext));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
 		if (!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 2)
  		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /cnn [message]");
 			return 1;
      	}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 2)
			{
	  			format(string, sizeof(string), "~b~%s~r~: ~w~%s", sendername, tmp);
				GameTextForAll(string, 5000, 3);
				new PlayerName[30];
	 			GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /cnn with message: %s", PlayerName, tmp);
			}
	 		else
	  		{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
        return 1;
	}
	
// === [Akill] ===
	if(strcmp(cmd, "/akill", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
        giveplayerid = strval(tmp);
		if(PlayerInfo[playerid][pAdmin] < 1)
		{
		    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
		    return 1;
		}
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /akill [playerid]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			    	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					SetPlayerHealth(giveplayerid, -999);
					format(string, sizeof(string), "AdmCMD: You have murdered %s.", giveplayer);
					SendClientMessage(playerid, COLOR_BLUE, string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /akill to kill %s", PlayerName, giveplayer);
					return 1;
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	}

// === [Admins] ===
	if(!strcmp(cmdtext, "/admins", true))
	{
	    SendClientMessage(playerid, COLOR_BLUE, "Checking for administrators online...");
		new count=0;
		for(new i=0; i<MAX_PLAYERS; i++)
		{
	    	if(IsPlayerConnected(i))
	    	{
	    	    if(logged[i] == 1)
	    	    {
					if(PlayerInfo[i][pAdmin] >= 1)
					{
						new str[256];
						new pname[24];
						GetPlayerName(i, pname, 24);
						format(str, 256, "Administrator %s [Level %d] ", pname, PlayerInfo[i][pAdmin]);
						SendClientMessage(playerid, COLOR_RED, str);
						count++;
					}
				}
			}
		}
		if(count == 0)
		{
	    	SendClientMessage(playerid, COLOR_RED, "There aren't any administrators online on the server!");
		}
		return 1;
	}
// === [Tele] ===
	if(strcmp(cmd, "/tele", true) == 0)
	{
		new telename[MAX_PLAYER_NAME];
		new teleid;
		new Float:pX, Float:pY, Float:pZ;
		tmp = strtok(cmdtext, idx);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /tele [teleportee id] [destination id]");
			return 1;
		}
		giveplayerid = strval(tmp);
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /tele [teleportee id] [destination id]");
			return 1;
		}
 		teleid = strval(tmp);
 		if(logged[playerid] == 1)
 		{
	        if(PlayerInfo[playerid][pAdmin] >= 2)
	        {
	            if(IsPlayerConnected(giveplayerid) && IsPlayerConnected(teleid))
	            {
	            	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GetPlayerName(teleid, telename, sizeof(telename));
					GetPlayerPos(teleid, pX,pY,pZ);
					SetPlayerPos(giveplayerid, pX,pY,pZ);
					format(string, sizeof(string), "AdmCMD: You teleported %s to %s.", giveplayer,telename);
					SendClientMessage(playerid, COLOR_BLUE, string);
					format(string, sizeof(string), "AdmCMD: You have been teleported to %s by Admin %s.", telename,sendername);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					new PlayerName[24];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /tele to tele %s to %s", PlayerName, giveplayer, telename);
					return 1;
				}
				else
				{
					if(!IsPlayerConnected(giveplayerid))
					{
						format(string, sizeof(string), "ID:%d is not an active player ID number.", giveplayerid);
						SendClientMessage(playerid, COLOR_RED, string);
					}
					if(!IsPlayerConnected(teleid))
					{
						format(string, sizeof(string), "ID:%d is not an active player ID number.", teleid);
						SendClientMessage(playerid, COLOR_RED, string);
					}
				}
			}
			else
			{
		 		SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [A] ===
	if(strcmp(cmd, "/a", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		GetPlayerName(playerid, sendername, sizeof(sendername));
		new length = strlen(cmdtext);
		while ((idx < length) && (cmdtext[idx] <= ' '))
		{
			idx++;
		}
		new offset = idx;
		new result[64];
		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		{
			result[idx - offset] = cmdtext[idx];
			idx++;
		}
		result[idx - offset] = EOS;
		if(!strlen(result))
		{
			SendClientMessage(playerid, COLOR_GREY, "USAGE: /a [text] [admin chat]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
			{
				format(string, sizeof(string), "Admin %s(%i): %s", sendername, playerid, result);
				for(new i = 0; i < MAX_PLAYERS; i ++)
				{
				    if(IsPlayerConnected(i))
				    {
				        if(PlayerInfo[i][pAdmin] >= 1)
				        {
				            SendClientMessage(i,COLOR_BLUE, string);
						}
					}
				}
				printf(string);
	            return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You aren't able to use administration chat!");
	            return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	}


// === [Clearchat] ===
	if(strcmp(cmdtext, "/clearchat", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				SendClientMessageToAll(COLOR_SYSTEM, " ");
				GameTextForAll("Chat cleared!", 1000,1);
				new PlayerName[30];
				GetPlayerName(playerid, PlayerName, 30);
				printf("[Command] %s has used /clearchat", PlayerName);
				return 1;
			}
			else
			{
	 			SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
	}

// === [Disarm] ===
	if(strcmp(cmd, "/disarm", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
        giveplayerid = strval(tmp);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "USAGE: /disarm [playerid]");
			return 1;
		}
		if(logged[playerid] == 1)
		{
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    if(IsPlayerConnected(giveplayerid))
				{
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					ResetPlayerWeapons(giveplayerid);
					format(string, sizeof(string), "AdmCMD: Admin %s has disarmed %s.", sendername,giveplayer);
					SendClientMessageToAll(COLOR_BLUE, string);
					format(string, sizeof(string), "AdmCMD: Admin %s disarmed you.", sendername);
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					new PlayerName[30];
					GetPlayerName(playerid, PlayerName, 30);
					printf("[Command] %s has used /disarm to disarm %s", PlayerName, giveplayer);
				}
				else
				{
	   				format(string, sizeof(string), "%d is not an active player ID number.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
// === [disarmall] ===
	if(strcmp(cmd, "/disarmall", true) == 0)
	{
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
        PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        if(logged[playerid] == 1)
        {
			if(PlayerInfo[playerid][pAdmin] >= 3)
			{
			    for(new i = 0; i < MAX_PLAYERS; i ++)
				{
		  			if(IsPlayerConnected(i))
					{
						ResetPlayerWeapons(i);
						format(string, sizeof(string), "AdmCMD: Admin %s has disarmed everyone.", sendername);
						SendClientMessage(i, COLOR_BLUE, string);
						new PlayerName[30];
						GetPlayerName(playerid, PlayerName, 30);
						printf("[Command] %s has used /disarmall to disarm everyone", PlayerName);
					}
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
				return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/healall", true) == 0)
	{
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 2)
			{
			    new PlayerName[30];
		 		GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
				printf("[Command] %s has used /healall to heal everyone", PlayerName);
			    for(new i = 0; i < MAX_PLAYERS; i++)
				{
				    SetPlayerHealth(i, 100);
				    format(string, sizeof(string), "AdmCMD: Admin %s has healed everyone.", sendername);
				    SendClientMessage(i, COLOR_BLUE, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/armourall", true) == 0)
	{
	    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 2)
			{
			    new PlayerName[30];
  				GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
				printf("[Command] %s has used /armourall to armour everyone.", PlayerName);
			    for(new i = 0; i < MAX_PLAYERS; i++)
				{
				    SetPlayerArmour(i, 100);
				    format(string, sizeof(string), "AdmCMD: Admin %s has armoured everyone.", sendername);
				    SendClientMessage(i, COLOR_BLUE, string);
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	if(strcmp(cmd, "/ajail", true) == 0)
	{
		new tmpp[256];
  		tmp = strtok(cmdtext, idx);
  		tmpp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct Usage: /ajail [playerid] [seconds]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(playerid, sendername, sizeof(sendername));
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		new Second = strval(tmpp);
		if(logged[playerid] == 1)
		{
		    if(PlayerInfo[playerid][pAdmin] >= 1)
		    {
				format(string, sizeof(string), "AdmCMD: You've jailed %s(%i)", giveplayer, giveplayerid);
				SendClientMessage(playerid, COLOR_BLUE, string);
				format(string, sizeof(string), "AdmCMD: %s(%i) has jailed you for %d seconds", sendername, playerid, Second);
				SendClientMessage(playerid, COLOR_BLUE, string);
				format(string, sizeof(string), "~g~Jailed by ~r~%s", sendername);
				GameTextForPlayer(giveplayerid, string, 1000, 1);
				SetPlayerInterior(giveplayerid, 3);
				SetPlayerPos(giveplayerid, 197.6661,173.8179,1003.0234);
				SetPlayerArmour(giveplayerid, 0);
				TogglePlayerControllable(giveplayerid, 0);
				ResetPlayerWeapons(giveplayerid);
				SetTimerEx("Unjail", Second*1000, 0, "i", giveplayerid);
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
	return 0;
}

public IsStringAName(string[])
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
	if(IsPlayerConnected(i) == 1)
	{
		new testname[MAX_PLAYER_NAME];
		GetPlayerName(i, testname, sizeof(testname));
		if(strcmp(testname, string, true, strlen(string)) == 0)
		{
			return 1;
		}
	}
}
	return 0;
}
public GetPlayerID(string[])
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
	if(IsPlayerConnected(i) == 1)
	{
		new testname[MAX_PLAYER_NAME];
		GetPlayerName(i, testname, sizeof(testname));
		if(strcmp(testname, string, true, strlen(string)) == 0)
		{
			return i;
		}
	}
}
	return INVALID_PLAYER_ID;
}
public SendMessageToAdmins(color,const string[])
{
	for(new i = 0; i <= MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) == 1)
		{
			if (IsPlayerAdmin(i) || PlayerInfo[i][pAdmin] >= 1)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
	return 1;
}
public Restart()
{
    SendRconCommand("gmx");
}
public Unjail(giveplayerid)
{
        //new tmpp[256];
        new giveplayer[MAX_PLAYER_NAME];
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		SetPlayerInterior(giveplayerid,0);
		SetPlayerPos(giveplayerid,1546.2803,-1675.6632,13.5620);
		TogglePlayerControllable(giveplayerid,1);
		GameTextForPlayer(giveplayerid, "unjailed", 1000,1);
}
public OnPlayerSelectedMenuRow(playerid, row)
{
	new sendername[24];
	new string[256];
	new Menu:Current = GetPlayerMenu(playerid);
	new Float:X,Float:Y,Float:Z,Float:Angle,carid;
	if(Current == TimeMenu)
	{
		switch(row)
		{
			case 0:
	        {
				ShowMenuForPlayer(AM, playerid);
			}
			case 1:
	        {
  				ShowMenuForPlayer(PM, playerid);
			}
		}
	}
	else if(Current == AM)
	{
		switch(row)
		{
			case 0:
	        {
				SetWorldTime(01);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 01:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
			case 1:
	        {
  				SetWorldTime(02);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 02:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 2:
	        {
  				SetWorldTime(03);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 03:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 3:
	        {
  				SetWorldTime(04);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 04:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 4:
	        {
  				SetWorldTime(05);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 05:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 5:
	        {
                SetWorldTime(06);
                GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 06:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 6:
	        {
  				SetWorldTime(07);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 07:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 7:
	        {
  				SetWorldTime(08);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 08:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
	        case 8:
	        {
  				SetWorldTime(09);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 09:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
    	    case 9:
	        {
  				SetWorldTime(10);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 10:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
			case 10:
	        {
  				SetWorldTime(11);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 11:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
			case 11:
	        {
  				SetWorldTime(12);
  				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 12:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
			}
		}
		OnPlayerExitedMenu(playerid);
	}
	else if(Current == PM)
	{
		switch(row)
		{
			case 0:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 13:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
				SetWorldTime(13);
			}
			case 1:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 14:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(14);
			}
	        case 2:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 15:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(15);
			}
	        case 3:
	        {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 16:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(16);
			}
	        case 4:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 17:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(17);
			}
	        case 5:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 18:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
                SetWorldTime(18);
			}
	        case 6:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 19:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(19);
			}
	        case 7:
	        {
                GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 20:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(20);
			}
	        case 8:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 21:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(21);
			}
    	    case 9:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 22:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(22);
			}
			case 10:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 23:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(23);
			}
			case 11:
	        {
	            GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "AdmCMD: %s(%i) has set the world time to 00:00", sendername, playerid);
				SendClientMessageToAll(COLOR_BLUE, string);
  				SetWorldTime(24);
			}
		}
		OnPlayerExitedMenu(playerid);
	}
	else if(Current == Vehicle)
	{
	    switch(row)
		{
			case 0:
	        {
				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(471,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
			case 1:
	        {
				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(539,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 2:
	        {
				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(441,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 3:
	        {
				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(495,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 4:
	        {
      			GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(520,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 5:
	        {
                GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				CreateVehicle(411,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 6:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(443,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 7:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(502,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
	        case 8:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(572,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
   			case 9:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(557,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
			case 10:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(483,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
			case 11:
	        {
  				GetPlayerPos(playerid,X,Y,Z);
				GetPlayerFacingAngle(playerid,Angle);
				carid = CreateVehicle(522,X,Y,Z,Angle,-1,-1,50000);
				PutPlayerInVehicle(playerid,carid,0);
				TogglePlayerControllable(playerid,1);
				if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
				SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
			}
		}
		OnPlayerExitedMenu(playerid);
	}
}
public OnPlayerExitedMenu(playerid)
{
    TogglePlayerControllable(playerid, 1);
	return 1;
}

