#include <a_samp>
#include <a_mysql>
#include <sscanf2>
#include <DC_CMD>

#define mysql_host     			"localhost"
#define mysql_user     			"root"
#define mysql_db 				"test"
#define mysql_pass 				""
#define Baza           			"Accountss"

#define Dialog      			ShowPlayerDialog
#define MAX_AIM_TICKS 			3
#define MAX_STRING 				512
#define DIALOGUNBAN 			899
#define SendMe(%0,%2,%1) 		SendClientMessage(%0, %2,%1)
#define COLOR_LIGHT_BLUE 		0xFFC801C8
#define COLOR_BOX 				0x00000050
#define COLOR_1 				0xFFFF00AA
#define COLOR_LIME 				0xB7FF00AA
#define COLOR_BBLUE 			0x20A9FFFF
#define COLOR_CLUB 				0x00AFF6AA
#define COLOR_ISPOLZUY 			0x7FB151FF
#define COLOR_GRAD1 			0xB4B5B7FF
#define COLOR_RD 				0xF81414FF
#define COLOR_SINIY 			0x00004FAA
#define COLOR_LG 				0x7FFF00FF
#define COLOR_BLUE 				0x33AAFFFF
#define COLOR_SALMON 			0xFA8072AA
#define COLOR_SYSTEM 			0xEFEFF7AA
#define COLOR_KHAKI 			0xF0E68CAA
#define COLOR_TEAL 				0x008080FF
#define COLOR_GRAD2 			0xBFC0C2FF
#define COLOR_INDIGO 			0x4B00B0AA
#define COLOR_IVORY 			0xFFFF82AA
#define COLOR_TEAL 				0x008080FF
#define COLOR_GRAD3 			0xCBCCCEFF
#define COLOR_GRAD4 			0xD8D8D8FF
#define COLOR_GRAD5 			0xE3E3E3FF
#define COLOR_GRAD6 			0xF0F0F0FF
#define COLOR_GRAD7 			0xF0F0F0FF
#define COLOR_GRAD8 			0xF0F0F0FF
#define COLOR_BLACK 			0x000000AA
#define COLOR_GREY 				0xAFAFAFAA
#define COLOR_BLUEGREEN 		0x46BBAA00
#define COLOR_RED 				0xAA3333AA
#define COLOR_LIGHTRED 			0xFF6347AA
#define COLOR_LIGHTBLUE 		0x33CCFFAA
#define COLOR_LIGHTGREEN 		0x9ACD32AA
#define COLOR_YELLOW2 			0xF5DEB3AA
#define COLOR_WHITE 			0xFFFFFFAA
#define COLOR_REDD 				0xFF0000AA
#define COLOR_BROW 				0xA85400AA
#define COLOR_FADE1 			0xE6E6E6E6
#define COLOR_FADE2 			0xC8C8C8C8
#define COLOR_FADE3 			0xAAAAAAAA
#define COLOR_FADE4 			0x8C8C8C8C
#define COLOR_FADE5 			0x6E6E6E6E
#define COLOR_PURPLE 			0xC2A2DAAA
#define COLOR_DBLUE 			0x2641FEAA
#define COLOR_ALLDEPT 			0xFF8282AA
#define COLOR_LIFE 				0xFEBC41AA
#define TEAM_HIT_COLOR 			0xFFFFFF00
#define TEAM_BLUE_COLOR 		0x8D8DFF00
#define COLOR_ADD 				0x63FF60AA
#define TEAM_GROVE_COLOR 		0x00D900C8
#define TEAM_VAGOS_COLOR 		0xFFC801C8
#define TEAM_BALLAS_COLOR 		0xD900D3C8
#define TEAM_AZTECAS_COLOR 		0x01FCFFC8
#define TEAM_CYAN_COLOR 		0xFF8282AA
#define TEAM_ORANGE_COLOR 		0xFF830000
#define COLOR_INVIS 			0xAFAFAF00
#define COLOR_SPEC 				0xBFC0C200
#define COLOR_STROKA 			0xFD0A9FF
#define Message     			SendClientMessage

new MYSQL_ARG;//Аргумент подключения
new asd[256];//Ячейка для работы с мускулом
new client[128];
new Menu:specmenu;
enum Info
{
    pName[24],
    pPassword[15],
	pAdmin,
	pKills,
	pDeaths[11],
	pBanned,
	pLogged,
};
new PlayerInfo[MAX_PLAYERS][Info];

new Text:freezedraw0;
new Text:freezedraw1;
new Text:freezedraw2;
new Text:freezedraw3;
new Text:freezedraw4;
new Text:Textdraw0;
new Text:Textdraw1;
new logoobject;
new god[MAX_PLAYERS];
new DMZona1object;
new DMZona2object;

main(){print("Server is Starting. By MisterFree");}

public OnGameModeInit()
{
    MYSQL_ARG = mysql_connect(mysql_host, mysql_user, mysql_db, mysql_pass);//Подключаем мускол(плагин) к серверу
	DMZona2object = CreateObject(5422, -1308.32, 504.84, 12.08,   0.00, 0.00, 180.00);
	DMZona1object = CreateObject(5422, 212.58, 1867.84, 29.08,   0.00, -20.00, -90.00);
    logoobject = CreateObject(5422, 1945.37, -1391.21, 19.22, 0.00, 0.00, 0.00);
    SetObjectMaterialText(DMZona2object, "Welcome\nZona #2", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xC4F0C9AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    SetObjectMaterialText(DMZona1object, "Welcome\nZona #1", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xC4F0C9AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    SetObjectMaterialText(logoobject, "Welcome\nQimby DM", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xa7e155AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
	SetGameModeText("DeathMatch | Qimby");
    DisableInteriorEnterExits();
    specmenu = CreateMenu("Spec Menu", 1, 50.0, 180.0, 200.0, 200.0);
	AddMenuItem(specmenu, 0, "- EXIT -");
	AddMenuItem(specmenu, 0, "SKick");
	AddMenuItem(specmenu, 0, "Kick");
	AddMenuItem(specmenu, 0, "Ban");
	AddMenuItem(specmenu, 0, "Slap");
	AddMenuItem(specmenu, 0, "GMTest");
	new stats[100];
	loadtd();
	loadobj();
	mysql_stat(stats);//Возвращает текущий статус сервера (время работы,количество потоков,запросов,открытых таблиц и количество запросов в секунду)
	print(stats);
	
	return 1;
}

public OnGameModeExit()
{
    mysql_close(MYSQL_ARG);
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid,playerid);
	SetPlayerPos(playerid,1125.3031,5.3819,1002.0859);
	SetPlayerFacingAngle(playerid, 179.5547);
	SetPlayerCameraPos(playerid,1286.8842,-1928.8975,112.6132);
	SetPlayerCameraLookAt(playerid,1461.5205,-1812.0117,74.5301);
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
 	if(GetPlayerMenu(playerid) == specmenu)
	{
		new specid = GetPVarInt(playerid,"SpecID");
		switch(row)
		{
			case 0:
			{
				TogglePlayerSpectating(playerid, 0);
				SetCameraBehindPlayer(playerid);
				SendClientMessage(playerid,0xF97804FF,"Слежка окончена");
				TogglePlayerControllable(playerid, false);
				DeletePVar(playerid,"SpecID");
			}
			case 1:
			{
				new name[MAX_PLAYER_NAME], str[98];
				GetPlayerName(playerid, name, sizeof(name));
				ShowMenuForPlayer(specmenu,playerid);
				format(str,350,"Вы тихо кикнули кикнули %s",name);
				SendClientMessage(playerid,-1, str);
				Kick(specid);
			}
			case 2:
			{
				ShowMenuForPlayer(specmenu,playerid);
				ShowPlayerDialog(playerid,1593,DIALOG_STYLE_INPUT,"{0006ff}Кикнуть","Введите причину кика игрока:","Кикнуть","Отмена");
			}
			case 3:
			{
				ShowMenuForPlayer(specmenu,playerid);
				ShowPlayerDialog(playerid,1593,DIALOG_STYLE_INPUT,"{0006ff}Бан","Введите причину бана игрока:","Забанить","Отмена");
			}
			case 4:
			{
				new Float:x, Float:y,Float:z;
				GetPlayerPos(specid,x,y,z);
				SetPlayerPos(specid,x,y,z+8);
				ShowMenuForPlayer(specmenu,playerid);
			}
			case 5:
			{
				new stringg[144];
				new Float:oldhp, Float:newhp;
				new Float:x, Float:y,Float:z;
				GetPlayerPos(specid,x,y,z);
				GetPlayerHealth(specid, oldhp);
				CreateExplosion(x, y , z, 5, 0.5);
				GetPlayerHealth(specid, newhp);
				format(stringg,144,"До проверки: %d HP, после: %d HP", oldhp, newhp);
				SetPlayerHealth(specid,oldhp);
				ShowMenuForPlayer(specmenu,playerid);
			}
		}
	}
	return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
	{
 		case 1:
			{
			    if(!response) return Kick(playerid);
			    if(!strlen(inputtext))
				{
					new loginmsg[230];
					new name[MAX_PLAYER_NAME];
					GetPlayerName(playerid, name, sizeof(name));
					format(loginmsg,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {ff0000}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
					ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",loginmsg,"Далее","Отмена");
				    SendClientMessage(playerid, -1, "Вы не чего не ввели");
			    	return 0;
			    }
			    if(strlen(inputtext) < 5 || strlen(inputtext) > 15)//Проверка на вводные данные
				{
					new loginmsg[230];
					new name[MAX_PLAYER_NAME];
					GetPlayerName(playerid, name, sizeof(name));
					format(loginmsg,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {ff0000}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
					ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",loginmsg,"Далее","Отмена");
				    SendClientMessage(playerid, -1, "Ваш пароль должен быть от 5 до 15 символов");
				    return 0;
	            }
				format(PlayerInfo[playerid][pPassword], 15,"%s", inputtext);
			    Reg(playerid);
	  			PlayerInfo[playerid][pLogged] = 1;
	  			SpawnPlayer(playerid);
	    		SetPlayerScore(playerid,PlayerInfo[playerid][pKills]);
			}
		case 2:
			{
			    if(!response) return Kick(playerid);
			    if(!strlen(inputtext))
				{
					new name[MAX_PLAYER_NAME];
					new loginmsg[187];
					GetPlayerName(playerid, name, sizeof(name));
					format(loginmsg,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
					ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",loginmsg,"Войти","Отмена");
				    SendClientMessage(playerid, -1, "Вы не чего не ввели");
			    	return 0;
			    }
				mysql_format(MYSQL_ARG, asd,90, "SELECT * FROM `"Baza"` WHERE `Name` = '%e' AND `Password` = '%e'", PlayerInfo[playerid][pName], inputtext);
	  			mysql_function_query(MYSQL_ARG, asd, true, "Avtoriz","ds", playerid, inputtext);
			}
		case 3:
			{
			    mysql_format(MYSQL_ARG, asd, 90, "SELECT `Name` FROM `"Baza"` WHERE `Name` = '%e'", PlayerInfo[playerid][pName]);
				mysql_function_query(MYSQL_ARG, asd, true, "Start_R_A","d", playerid);
			}
		case 4:
			{
				if(response)
				{
				    new string[256];
					if(!strlen(inputtext))return ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"Репорт","{FFFFFF}Введите сообщение для связи с администрацией сервера\n","Готово","Отмена");
					new sendername[MAX_PLAYER_NAME];
					GetPlayerName(playerid, sendername, sizeof(sendername));
					format(string, sizeof(string), "{d53e07}Ваша жалоба: %s",(inputtext));
					SendClientMessage(playerid, COLOR_WHITE, string);
					format(string, sizeof(string), "{C4F0C9}[А] {ff0000}Жалоба от {ffffff}%s[%d]{6495ED}: %s", sendername, playerid, (inputtext));
					ABroadCast(COLOR_LIME,string,1);
				}
			}
  		case 5:
			{
				if(!response) return true;
				switch(listitem)
				{
					case 0:
					{
					    SpawnPlayer(playerid);
						SendClientMessage(playerid, COLOR_LIGHTRED,"{c4f0c9}[Qimby DM]{FFFFFF}Телепортация...");
			    		TextDrawShowForPlayer(playerid,freezedraw0);
			    		TextDrawShowForPlayer(playerid,freezedraw1);
			    		TextDrawShowForPlayer(playerid,freezedraw2);
			    		TextDrawShowForPlayer(playerid,freezedraw3);
			    		TextDrawShowForPlayer(playerid,freezedraw4);
						SetTimerEx("UnfreezeSpawn", 3000, false, "i", playerid);
						TogglePlayerControllable(playerid, false);
						SetPlayerVirtualWorld(playerid, 0);
						if(PlayerInfo[playerid][pAdmin] > 0)
						{
							SendClientMessage(playerid, COLOR_LIGHTRED,"Виртуальный мир изменен на: {00CCCC}#0");
						}
						return 1;
					}
					case 1:
					{
					    SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 1);
						SetPlayerPos(playerid,253.6540,1881.1652,20.5654);
						SetPlayerFacingAngle(playerid,90);
						SendClientMessage(playerid, COLOR_LIGHTRED,"{c4f0c9}[Qimby DM]{FFFFFF}Телепортация...");
			    		TextDrawShowForPlayer(playerid,freezedraw0);
			    		TextDrawShowForPlayer(playerid,freezedraw1);
			    		TextDrawShowForPlayer(playerid,freezedraw2);
			    		TextDrawShowForPlayer(playerid,freezedraw3);
			    		TextDrawShowForPlayer(playerid,freezedraw4);
						SetTimerEx("UnfreezeSpawn", 3000, false, "i", playerid);
						TogglePlayerControllable(playerid, false);
						GivePlayerWeapon(playerid, 24, 200);
						GivePlayerWeapon(playerid, 34, 25);
						GivePlayerWeapon(playerid, 17, 50);
						GivePlayerWeapon(playerid, 31, 500);
						SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM]{FFFFFF}Комплект оружия получен.");
						if(PlayerInfo[playerid][pAdmin] > 0)
						{
							SendClientMessage(playerid, COLOR_LIGHTRED,"Виртуальный мир изменен на: {00CCCC}#1");
						}
						return 1;
					}
					case 2:
					{
					    SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 2);
						SetPlayerPos(playerid,-1304.9114,504.7630,11.1953);
						SetPlayerFacingAngle(playerid,90);
						SendClientMessage(playerid, COLOR_LIGHTRED,"{c4f0c9}[Qimby DM]{FFFFFF}Телепортация...");
			    		TextDrawShowForPlayer(playerid,freezedraw0);
			    		TextDrawShowForPlayer(playerid,freezedraw1);
			    		TextDrawShowForPlayer(playerid,freezedraw2);
			    		TextDrawShowForPlayer(playerid,freezedraw3);
			    		TextDrawShowForPlayer(playerid,freezedraw4);
						SetTimerEx("UnfreezeSpawn", 3000, false, "i", playerid);
						TogglePlayerControllable(playerid, false);
						GivePlayerWeapon(playerid, 24, 200);
						GivePlayerWeapon(playerid, 17, 50);
						GivePlayerWeapon(playerid, 31, 500);
						SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM]{FFFFFF}Комплект оружия получен.");
						if(PlayerInfo[playerid][pAdmin] > 0)
						{
							SendClientMessage(playerid, COLOR_LIGHTRED,"Виртуальный мир изменен на: {00CCCC}#2");
						}
						return 1;
					}
					case 3:
					{
					    SetPlayerInterior(playerid,0);
						SetPlayerVirtualWorld(playerid, 3);
						new rand=random(2);
						switch (rand)
						{
							case 0:SetPlayerPos(playerid,-90.6408,-37.2659,12.6100);
							case 1:SetPlayerPos(playerid,-80.6408,-37.2659,12.6100);
						}
						SetPlayerFacingAngle(playerid,90);
						SendClientMessage(playerid, COLOR_LIGHTRED,"{c4f0c9}[Qimby DM]{FFFFFF}Телепортация...");
			    		TextDrawShowForPlayer(playerid,freezedraw0);
			    		TextDrawShowForPlayer(playerid,freezedraw1);
			    		TextDrawShowForPlayer(playerid,freezedraw2);
			    		TextDrawShowForPlayer(playerid,freezedraw3);
			    		TextDrawShowForPlayer(playerid,freezedraw4);
						SetTimerEx("UnfreezeSpawn", 3000, false, "i", playerid);
						TogglePlayerControllable(playerid, false);
						GivePlayerWeapon(playerid, 24, 200);
						GivePlayerWeapon(playerid, 17, 50);
						GivePlayerWeapon(playerid, 31, 500);
						SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM]{FFFFFF}Комплект оружия получен.");
						if(PlayerInfo[playerid][pAdmin] > 0)
						{
							SendClientMessage(playerid, COLOR_LIGHTRED,"Виртуальный мир изменен на: {00CCCC}#3");
						}
						return 1;
					}
				}
			}
        case 6:
		    {
		        if(response)
		        {
		            switch(listitem)
		            {
		                case 0:
		                {
		                	ShowPlayerDialog(playerid,7,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 1:
		                {
		                	ShowPlayerDialog(playerid,8,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 2:
		                {
		                	ShowPlayerDialog(playerid,9,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 3:
		                {
		                	ShowPlayerDialog(playerid,10,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 4:
		                {
		                	ShowPlayerDialog(playerid,11,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 5:
		                {
		                	ShowPlayerDialog(playerid,12,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 6:
		                {
		                	ShowPlayerDialog(playerid,13,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 7:
		                {
		                	ShowPlayerDialog(playerid,14,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 8:
		                {
		                	ShowPlayerDialog(playerid,15,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 9:
		                {
		                	ShowPlayerDialog(playerid,16,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 10:
		                {
		                	ShowPlayerDialog(playerid,17,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 11:
		                {
		                	ShowPlayerDialog(playerid,18,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 12:
		                {
		                	ShowPlayerDialog(playerid,19,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 13:
		                {
		                	ShowPlayerDialog(playerid,20,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 14:
		                {
		                	ShowPlayerDialog(playerid,21,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 15:
		                {
		                	ShowPlayerDialog(playerid,22,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		                case 16:
		                {
		                	ShowPlayerDialog(playerid,23,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
		                }
		            }
		        }
		    }
                case 7:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8823,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 2)) RemovePlayerAttachedObject(playa, 2);
                          	SetPlayerAttachedObject(playa,2,19137,2,0.100000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект {ff0000}#1");
                    	}
                	}
                }
                case 8:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8824,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 7)) RemovePlayerAttachedObject(playa, 7);
                          	SetPlayerAttachedObject(playa,7, 19270, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект {ff0000}#2");
                        }
                    }
                }
                case 9:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8825,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 4)) RemovePlayerAttachedObject(playa, 4);
                          	SetPlayerAttachedObject(playa,4, 18646, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #3");
                        }
                    }
                }
                case 10:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8826,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 7)) RemovePlayerAttachedObject(playa, 7);
                          	SetPlayerAttachedObject(playa,7, 19163, 2, 0.111052, 0.021643, -0.000846, 100.280899, 100.752510, 445.071044, 1.100000, 1.300000, 1.300000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #4");
                        }
                	}
                }
                case 11:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8827,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
                			SetPlayerAttachedObject(playa,0, 18915, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #5");
                   		}
                	}
                }
                case 12:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8828,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
                			SetPlayerAttachedObject(playa,0, 18912, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #6");
             			}
                	}
                }
                case 13:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8829,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                          {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
                			SetPlayerAttachedObject(playa,0, 18916, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #7");
                          }
                     }
                }
                case 14:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8830,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                          {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
                			SetPlayerAttachedObject(playa,0, 18917, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #8");
                          }
                     }
                }
                case 15:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8831,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
                			SetPlayerAttachedObject(playa,0, 18918, 2, 0.1, 0.03, -0.005, 90.0, 180.0, 90.0);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #9");
                   		}
    				}
                }
                case 16:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8832,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                          {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 4)) RemovePlayerAttachedObject(playa, 4);
                			SetPlayerAttachedObject(playa,4, 3528, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 0.100000, 0.100000, 0.100000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #10");
                   		}
   					}
                }
                case 17:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8833,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                   		{
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 4)) RemovePlayerAttachedObject(playa, 4);
                			SetPlayerAttachedObject(playa,4, 18643, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #11");
                   		}
    				}
                }
                case 18:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8834,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0) || IsPlayerAttachedObjectSlotUsed(playa, 1) || IsPlayerAttachedObjectSlotUsed(playa, 4))
                          	{
                          		RemovePlayerAttachedObject(playa, 0);
                          		RemovePlayerAttachedObject(playa, 1);
                          		RemovePlayerAttachedObject(playa, 4);
                          	}
			                SetPlayerAttachedObject(playa,0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
			                SetPlayerAttachedObject(playa,1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
			                SetPlayerAttachedObject(playa,4, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #12");
                   		}
                     }
                }
                case 19:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8835,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 7)) RemovePlayerAttachedObject(playa, 7);
                			SetPlayerAttachedObject(playa,7, 19078, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #13");
                   		}
                   	}
                }
                case 20:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8836,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 7)) RemovePlayerAttachedObject(playa, 7);
                			SetPlayerAttachedObject(playa,7, 354, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #14");
                   		}
                	}
                }
                case 21:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8837,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                         	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 1)) RemovePlayerAttachedObject(playa, 1);
                			SetPlayerAttachedObject(playa,1, 356, 6, 0.013610, -0.021393, -0.144862, 2.354303, 354.413848, 0.219168, 3.034477, 3.000000, 3.000000);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #15");
                   		}
                     }
                }
                case 22:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8838,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                        {
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 1)) RemovePlayerAttachedObject(playa, 1);
                			SetPlayerAttachedObject(playa,1, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                   			SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #16");
                      	}
                     }
                }
                case 23:
                {
                    if(response)
                    {
                        if(!strlen(inputtext)) return ShowPlayerDialog(playerid,8839,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                        if(strval(inputtext) != INVALID_PLAYER_ID)
                       	{
                          	new playa = strval(inputtext);
                          	if(IsPlayerAttachedObjectSlotUsed(playa, 0)) RemovePlayerAttachedObject(playa, 0);
             				SetPlayerAttachedObject(playa,0, 19078, 1, -1.097527, -0.348305, -0.008029, 0.000000, 0.000000, 0.000000, 8.073966, 8.073966, 8.073966);
                          	SendClientMessage(playa, 0x6495EDFF, "{a7e155}Администратор {c4f0c9}Qimby DM {a7e155}выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #17");
                 		}
                     }
                }
        case 1593:
			{
				if(response)
				{
					new pname[24],pname2[24],str[144];
					GetPlayerName(GetPVarInt(playerid,"SpecID"), pname, MAX_PLAYER_NAME);
					GetPlayerName(playerid, pname2, MAX_PLAYER_NAME);
					format(str,sizeof(str),"Администратор %s кикнул %s Причина: %s",pname2, pname,inputtext);
					SendClientMessageToAll(COLOR_LIGHTRED,str);
					Kick(GetPVarInt(playerid,"SpecID"));
				}
				else return 1;
			}
		case 1594:
			{
			if(response)
			{
				new pname[24],pname2[24],str[144];
				GetPlayerName(GetPVarInt(playerid,"SpecID"), pname, MAX_PLAYER_NAME);
				GetPlayerName(playerid, pname2, MAX_PLAYER_NAME);
				format(str,sizeof(str),"Администратор %s забанил игрока %s Причина: %s",pname2, pname,inputtext);
				SendClientMessageToAll(COLOR_LIGHTRED,str);
				PlayerInfo[GetPVarInt(playerid,"SpecID")][pBanned] = 1;
				Kick(GetPVarInt(playerid,"SpecID"));
			}
			else return 1;
			}
	}
	return 1;
}
public OnPlayerText(playerid, text[])
{
    new string[256];
    if(PlayerInfo[playerid][pLogged] == 1)
    {
		new sendername[MAX_PLAYER_NAME];
	 	GetPlayerName(playerid, sendername, sizeof(sendername));
	 	format(string, sizeof(string), "{C4F0C9}%s:{FFFFFF} %s", sendername, text);
	 	SendMessageToAll(COLOR_WHITE, string);
	 	return 0;
 	}
	return true;
}
public OnPlayerConnect(playerid)
{
    PlayerInfo[playerid][pLogged] = 0;
    new name[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, name, sizeof(name));

	if(strfind(name, "Kenneth_Harper",  true)  == -1)
 	{
 	    god[playerid] = 1;
    }
    if(PlayerInfo[playerid][pAdmin] > 0){god[playerid] = 0;}

    RemoveBuildingForPlayer(playerid, 3366, 276.6563, 2023.7578, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3366, 276.6563, 1989.5469, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3366, 276.6563, 1955.7656, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3267, 188.2422, 2081.6484, 22.4453, 0.25);
	RemoveBuildingForPlayer(playerid, 3277, 188.2422, 2081.6484, 22.4063, 0.25);
	RemoveBuildingForPlayer(playerid, 16294, 15.1797, 1719.3906, 21.6172, 0.25);
	RemoveBuildingForPlayer(playerid, 3267, 15.6172, 1719.1641, 22.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 3277, 15.6016, 1719.1719, 22.3750, 0.25);
	RemoveBuildingForPlayer(playerid, 16093, 211.6484, 1810.1563, 20.7344, 0.25);
	RemoveBuildingForPlayer(playerid, 16638, 211.7266, 1809.1875, 18.9844, 0.25);
	RemoveBuildingForPlayer(playerid, 16670, 330.7891, 1813.2188, 17.8281, 0.25);
	RemoveBuildingForPlayer(playerid, 16095, 279.1328, 1829.7813, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3280, 245.3750, 1862.3672, 20.1328, 0.25);
	RemoveBuildingForPlayer(playerid, 3280, 246.6172, 1863.3750, 20.1328, 0.25);
	RemoveBuildingForPlayer(playerid, 16096, 120.5078, 1934.0313, 19.8281, 0.25);
	RemoveBuildingForPlayer(playerid, 16671, 193.9531, 2051.7969, 20.1797, 0.25);
	RemoveBuildingForPlayer(playerid, 3268, 276.6563, 2023.7578, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3268, 276.6563, 1989.5469, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3268, 276.6563, 1955.7656, 16.6328, 0.25);
	RemoveBuildingForPlayer(playerid, 3267, 354.4297, 2028.4922, 22.4141, 0.25);
	RemoveBuildingForPlayer(playerid, 3277, 354.4141, 2028.5000, 22.3750, 0.25);
	RemoveBuildingForPlayer(playerid, 16668, 357.9375, 2049.4219, 16.8438, 0.25);
	RemoveBuildingForPlayer(playerid, 16669, 380.2578, 1914.9609, 17.4297, 0.25);
	RemoveBuildingForPlayer(playerid, 1411, 347.1953, 1799.2656, 18.7578, 0.25);
	RemoveBuildingForPlayer(playerid, 1411, 342.9375, 1796.2891, 18.7578, 0.25);
	RemoveBuildingForPlayer(playerid, 1278, 1117.2813, 1204.7109, 23.9375, 0.25);
	RemoveBuildingForPlayer(playerid, 1278, 1136.9766, 1204.7109, 23.9375, 0.25);
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    new PlName[MAX_PLAYER_NAME],count;
	GetPlayerName(playerid,PlName,sizeof(PlName));
	for (new i; i < strlen(PlName); i++)
	{
	    if (PlName[i] >= '0' && PlName[i] <= '9')
 	   {
	        count++;
	        if(count == 4)
     	   {
         	   SendClientMessage(playerid,0xE0EA64AA,"В вашем нике более 3 цифр!");
         	   Kick(playerid);
         	   break;
     	   }
 	   }
	}
	new desti[32];
	GetPlayerVersion(playerid, desti, sizeof(desti));
	if(strcmp(desti, "unknown", true) == 0)
	{
		format(client, sizeof(client), ">>>> Ruskadance's AntiAttack: %s[%d] использовал DedaVanya", PlayerInfo, playerid);
	    printf(client);
	    BanEx(playerid, "DedaVanya");
	}
	ShowPlayerDialog(playerid, 3,DIALOG_STYLE_MSGBOX,"Правила сервера", "{FF0B0B}На сервере запрещено:{ffffff}\n- Убивать Администрацию (в не ДМ зоны)\n- Оскорблять других игроков\n- Использование любых программ скриптов читов и.т.п. дающие нечестное преимущество в игре\n- Использование багов\n- Выдавать себя за администратора\n- Угрожать игрокам\n{002fff}Если вы согласны нажмите на 'Далее'" ,"Далее","Отмена");
    SetPlayerColor(playerid,0xFFFFFF80);
    GetPlayerName(playerid, PlayerInfo[playerid][pName], 24);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	if(PlayerInfo[playerid][pLogged] == 1)
	{
 	   Save(playerid);
 }
	return 1;
}

forward SetPlayerSpawn(playerid);
public SetPlayerSpawn(playerid)
{
	SetPlayerSkin(playerid,random(299));
	SetPlayerPos(playerid,1937.0,-1386.87,16.6575);
	SetPlayerFacingAngle(playerid,123.3588);
	SetPlayerInterior(playerid,0);
	SetPlayerColor(playerid,0xD3D3D330);
	SetPlayerVirtualWorld(playerid, 0);
	GivePlayerWeapon(playerid, 31, 500);
	GivePlayerWeapon(playerid, 24, 200);
	TextDrawShowForPlayer(playerid,freezedraw0);
	TextDrawShowForPlayer(playerid,freezedraw1);
	TextDrawShowForPlayer(playerid,freezedraw2);
	TextDrawShowForPlayer(playerid,freezedraw3);
	TextDrawShowForPlayer(playerid,freezedraw4);
	SetTimerEx("UnfreezeSpawn", 2500, false, "i", playerid);
	TogglePlayerControllable(playerid, false);
    return true;
}
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pBanned] == 0)
	{
	    if(PlayerInfo[playerid][pLogged] == 0)
		{
   			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы были кикнуты с сервера, Причина: Необходимо авторизоваться!");
			Kick(playerid);
			return true;
		}
    	SetPlayerSpawn(playerid);
	}
	else{SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FF0000}Ваш аккаунт заблокирован!");SendClientMessage(playerid, COLOR_LIGHTBLUE, "{FFFFFF}Чтобы закрыть игру введите /q");}
    return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid, playerid, reason);
    PlayerInfo[killerid][pKills] ++;//+score
    PlayerInfo[playerid][pDeaths] ++;//+dead
	SetPlayerScore(killerid, PlayerInfo[killerid][pKills]);
	Save(playerid);
	Save(killerid);
    return true;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_YES)
    {
        ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"Репорт","{FFFFFF}Введите сообщение для связи с администрацией сервера\n","Готово","Отмена");
    }
    if(newkeys == KEY_ACTION)//CTRL
    {
    }
	return true;
}
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    new string[128];
    if(PlayerInfo[playerid][pAdmin] < 1) return true;
    SetPlayerInterior(playerid, 0), SetPlayerVirtualWorld(playerid, 0);
    if (GetPlayerState(playerid) == 2) SetVehiclePos(GetPlayerVehicleID(playerid), fX, fY, fZ);
    else SetPlayerPos(playerid, fX, fY, fZ);
    format(string, sizeof(string), "Вы успешно телепортировались. Координаты: X - %d Y - %d Z - %d",fX, fY, fZ);
    SendClientMessage(playerid,COLOR_WHITE,string);
	TextDrawShowForPlayer(playerid,freezedraw0);
	TextDrawShowForPlayer(playerid,freezedraw1);
	TextDrawShowForPlayer(playerid,freezedraw2);
	TextDrawShowForPlayer(playerid,freezedraw3);
	TextDrawShowForPlayer(playerid,freezedraw4);
	SetTimerEx("UnfreezeSpawn", 3000, false, "i", playerid);
	TogglePlayerControllable(playerid, false);
    return true;
}
//DC_CMD Начало кмд
CMD:a(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 0)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
	        if(sscanf(params,"s", params[0])) return SendClientMessage(playerid, -1, "Используй: /a [сообщение]");
	        new arank[64];
			new string[228];
			new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] == 1) { arank = "{c4f0c9}[A]{ffffff}"; }
            else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "{c4f0c9}[A]{ffffff}"; }
            else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "{c4f0c9}[A]{ffffff}"; }
            else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "{c4f0c9}[A]{ffffff}"; }
            else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "{c4f0c9}[A]{ffffff}"; }

            else { arank = "{c4f0c9}[A]{ffffff}"; }

            format(string, sizeof(string), "%s %s{7fff00}:  %s", arank, sendername, params[0]);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendAdminMessage(COLOR_WHITE, string);
            }
            printf("Admin %s: %s", sendername, params[0]);
  	      	return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:skin(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return true;
	if(sscanf(params, "ui", params[0], params[1])) return SendClientMessage(playerid,COLOR_WHITE, "Введите: /skin [id игрока] [номер]");
	if(params[1] < 1 || params[1] > 299) { SendClientMessage(playerid, COLOR_WHITE, "Нельзя установить меньше 1 и больше 299"); return true; }
	SetPlayerSkin(params[0], params[1]);
	new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME], string[100];
 	GetPlayerName(playerid, sendername, sizeof(sendername));
 	GetPlayerName(params[0], giveplayer, sizeof(giveplayer));
	format(string, sizeof(string), "Скин изменен администратором %s[%d] на %d",sendername, playerid, params[1]);
	SendClientMessage(params[0],COLOR_WHITE, string);
	format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] изменил скин %s[%d] на %d",sendername, playerid, giveplayer, params[0], params[1]);
	SendGodMessage(COLOR_LIGHTRED, string);
	return true;
}
CMD:sethp(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return true;
	if(sscanf(params, "ui", params[0], params[1])) return SendClientMessage(playerid,COLOR_WHITE, "Введите: /sethp [id игрока] [кол-во]");
	if(params[1] < 0 || params[1] > 140) { SendClientMessage(playerid, COLOR_WHITE, "Нельзя установить меньше 0 и больше 140"); return true; }
	SetPlayerHealth(params[0], params[1]);
	new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME], string[100];
 	GetPlayerName(playerid, sendername, sizeof(sendername));
 	GetPlayerName(params[0], giveplayer, sizeof(giveplayer));
	format(string, sizeof(string), "Количество здоровья изменено администратором %s[%d] на %d",sendername, playerid, params[1]);
	SendClientMessage(params[0],COLOR_WHITE, string);
	format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] изменил количество HP %s[%d] на %d",sendername, playerid, giveplayer, params[0], params[1]);
	SendGodMessage(COLOR_LIGHTRED, string);
	return true;
}
CMD:veh(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] < 1) return true;
	new sendername[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(PlayerInfo[playerid][pLogged] == 1)
	{
 		if(sscanf(params,"iii",params[0],params[1],params[2])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /veh [id] [color1] [color2]");
	 	if(params[0] < 400 || params[0] > 611) { SendClientMessage(playerid, COLOR_WHITE, "Номер машины не может быть меньше 400 и больше чем 611!"); return true; }
		if(params[1] < 0 || params[1] > 255) { SendClientMessage(playerid, COLOR_WHITE, "Номер цвета не может быть меньше 0 и больше 255!"); return true; }
		if(params[2] < 0 || params[2] > 255) { SendClientMessage(playerid, COLOR_WHITE, "Номер цвета не может быть меньше 0 и больше 255!"); return true; }
	 	new Float:pos[4];
	 	new string[145];
	 	GetPlayerPos(playerid,pos[0],pos[1],pos[2]);
	 	GetPlayerFacingAngle(playerid,pos[3]);
	 	CreateVehicle(params[0],pos[0],pos[1]+1,pos[2]+1,pos[3]+1,params[1],params[2],600000);
		format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] заспавнил кар #%d",sendername, playerid, params[0]);
		SendGodMessage(COLOR_LIGHTRED, string);
	}
 	return true;
}
CMD:gethere(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 2)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
	        if(sscanf(params,"d", params[0])) return SendClientMessage(playerid, -1, "Используй: /gethere [id]");
	        if(PlayerInfo[params[0]][pLogged] == 1)
			{
				new sendername[MAX_PLAYER_NAME], gp[MAX_PLAYER_NAME], string[138];
			 	GetPlayerName(playerid, sendername, sizeof(sendername));
			 	GetPlayerName(params[0], gp, sizeof(gp));
			    new Float:x, Float:y, Float:z;
				GetPlayerPos(playerid, x, y, z);
				SetPlayerInterior(params[0], GetPlayerInterior(playerid));
				SetPlayerVirtualWorld(params[0], GetPlayerVirtualWorld(playerid));
				if (IsPlayerInAnyVehicle(params[0]))
				{
					SetVehiclePos(GetPlayerVehicleID(params[0]), x+1,y+1,z);
					return true;
				}
				SetPlayerPos(params[0], x+1, y+1, z);
				format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] телепортировал к себе %s[%d]",sendername, playerid,gp, params[0]);
				SendGodMessage(COLOR_LIGHTRED, string);
			}
 			else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Игрок не авторизовался!");}
    	    return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:god(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 3)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
		    if(PlayerInfo[playerid][pLogged] == 1)
			{
		        if(sscanf(params,"d", params[0])) return SendClientMessage(playerid, -1, "Используй: /god [id]");
	   			if(god[params[0]] == 0)
				{
	  				SendClientMessage(params[0], COLOR_LIGHTBLUE, "Режим GOD {a7e155}включен.");
		  		  	god[params[0]] = 1;
					format(string, sizeof(string), "{c4f0c9}[A] {6495ED}Администратор %s[%d] {a7e155}включил {ffff00}GODMODE{6495ED} %s[%d]",sendername, playerid,gp, params[0]);
					SendAdminMessage(COLOR_LIGHTRED, string);
				}
				else
				{
			 		SendClientMessage(params[0], COLOR_LIGHTBLUE, "Режим GOD {ff0000}выключен.");
	 			 	god[params[0]] = 0;
					format(string, sizeof(string), "{c4f0c9}[A] {6495ED}Администратор %s[%d] {ff0000}выключил {ffff00}GODMODE{6495ED} %s[%d]",sendername, playerid,gp, params[0]);
					SendAdminMessage(COLOR_LIGHTRED, string);
				}
   	     		return 1;
			}
 			else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Игрок не авторизовался!");}
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:goto(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 1)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
	        if(sscanf(params,"d", params[0])) return SendClientMessage(playerid, -1, "Используй: /goto [id]");
	        if(PlayerInfo[params[0]][pLogged] == 1)
			{
  			  	new Float:x, Float:y, Float:z;
				GetPlayerPos(params[0], x, y, z);
				SetPlayerInterior(playerid, GetPlayerInterior(params[0]));
				SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(params[0]));
				if (IsPlayerInAnyVehicle(playerid))
				{
					SetVehiclePos(GetPlayerVehicleID(playerid), x+1,y+1,z);
					return true;
				}
				SetPlayerPos(playerid, x+1, y+1, z);
			}
 			else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Игрок не авторизовался!");}
    	    return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:ahelp(playerid, params[])
{
	if(PlayerInfo[playerid][pLogged] == 1)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
  		{
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM] {a7e155}Все админ-команди:");
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[1 Уровень] {a7e155}/cc | /a | /sp | /pm | /kick");
	    }
	   	if(PlayerInfo[playerid][pAdmin] >= 2)
   	 	{
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[2 Уровень] {a7e155}/veh | /delobj | /ainfo | /goto");
 	 	}
	    if(PlayerInfo[playerid][pAdmin] >= 3)
   	 	{
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[3 Уровень] {a7e155}/oj | /sethp | /skin | /gethere");
	  	}
    	if(PlayerInfo[playerid][pAdmin] >= 4)
   	 	{
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[4 Уровень] {a7e155}/jetpack");
	  	}
	}
	else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
 	return 1;
}
CMD:sp(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] > 0)
	{
		new ID;
		new str[128], pname[MAX_PLAYER_NAME], gp[MAX_PLAYER_NAME];
		if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xF97804FF, "Используйте: /sp [ID]");
		if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, 0xF97804FF, "Такого игрока нет");
		else
		{
			GetPlayerName(ID, gp, MAX_PLAYER_NAME);
			GetPlayerName(ID, pname, MAX_PLAYER_NAME);
			SetPVarInt(playerid,"SpecID",ID);
			format(str,sizeof(str),"Вы начали слежку за %s",pname);
			SendClientMessage(playerid,COLOR_LIGHTRED,str);
		    new string[129];
			format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] начал слежку за %s[%d]",PlayerInfo[playerid][pName], playerid, PlayerInfo[params[0]][pName], params[0]);
			SendGodMessage(COLOR_LIGHTRED, string);
			TogglePlayerSpectating(playerid, ID);
			PlayerSpectatePlayer(playerid, ID);
			TogglePlayerControllable(playerid, false);
			ShowMenuForPlayer(specmenu,playerid);
		}
	}
	return 1;
}
CMD:delobj(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 1)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
  			if(sscanf(params,"d", params[0])) return SendClientMessage(playerid, -1, "Используй: /delobj [id]");
   			if(params[0] != INVALID_PLAYER_ID)
		    {
				new sendername[MAX_PLAYER_NAME],gp[MAX_PLAYER_NAME], string[123];
			 	GetPlayerName(playerid, sendername, sizeof(sendername));
			 	GetPlayerName(params[0], gp, sizeof(gp));
		        RemovePlayerAttachedObject(params[0], 0);
	         	RemovePlayerAttachedObject(params[0], 1);
	          	RemovePlayerAttachedObject(params[0], 2);
	           	RemovePlayerAttachedObject(params[0], 3);
	            RemovePlayerAttachedObject(params[0], 4);
	            RemovePlayerAttachedObject(params[0], 5);
	            RemovePlayerAttachedObject(params[0], 6);
	            RemovePlayerAttachedObject(params[0], 7);
	            RemovePlayerAttachedObject(params[0], 8);
	            RemovePlayerAttachedObject(params[0], 9);
				format(string, sizeof(string), "{a7e155}Все объекты с вас удалены администратором %s[%d]",sendername, playerid);
				SendClientMessage(params[0],COLOR_WHITE, string);
				format(string, sizeof(string), "{a7e155}Вы удалили все объекты с %s[%d]",gp, params[0]);
				SendClientMessage(playerid,COLOR_WHITE, string);
			}
    	    return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:pm(playerid,params[])
{
	if(sscanf(params, "ds", params[0],params[1])) return SendClientMessage(playerid,COLOR_WHITE, "Введите: /pm [id] [message]");
	if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid,COLOR_WHITE, "Данный игрок отсутствует.");
	new pm[128];
 	new pm1[125];
	new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, sendername, sizeof(sendername));
 	GetPlayerName(params[0], giveplayer, sizeof(giveplayer));
	format(pm,sizeof(pm),"{C4F0C9}[Ответ от %s]{A7E155}: %s",sendername,params[1]);
	SendClientMessage(params[0],COLOR_WHITE,pm);
	format(pm1,sizeof(pm1),"{C4F0C9}[А] {A7E155}%s[%d] ответил %s{FFFFFF}: %s",sendername,playerid,giveplayer,params[1]);
 	SendAdminMessage(COLOR_WHITE, pm1);
	return true;
}
CMD:dgun(playerid, params[]) { new str[120], sn[221]; Message(playerid,COLOR_WHITE,"Вы были кикнуты по подозрению в читерстве (#d-gun)"); GetPlayerName(playerid, sn, sizeof(sn)); format(str, sizeof(str), "[Anti-Cheat] %s [%d] был кикнут за ввод команды ''/dgun''", sn, playerid); SendAdminMessage(COLOR_GREY, str); Kick(playerid); return true; }
CMD:kick(playerid,params[])
{
	new sendername[MAX_PLAYER_NAME], paramsname[MAX_PLAYER_NAME];
 	GetPlayerName(playerid, sendername, sizeof(sendername));
 	GetPlayerName(playerid, paramsname, sizeof(paramsname));
	if(PlayerInfo[playerid][pAdmin] == 0) return false;
	if(sscanf(params, "ds", params[0],params[1])) return SendClientMessage(playerid,COLOR_WHITE,"Введите: /kick [id] [причина]");
	new kick[100];
	format(kick,100,"Администратор %s[%d] кикнул игрока %s. Причина: %s",sendername,playerid,paramsname,params[1]);
	SendClientMessageToAll(0xFF4500AA,kick);
 	printf("Admin %s[%d] kicked %s", sendername, playerid, params[0]);
	Kick(params[0]);
	return true;
}
CMD:tp(playerid, params[])
{
	if(PlayerInfo[playerid][pLogged] == 1)
	{
		ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "{0099CC}Телепорт", "1. Спавн\n2. ДМ Зона #1 [Зона 51]\n3. ДМ Зона #2 [Авиа]", "Далее", "Отмена");
   		return 1;
	}
	else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
 	return 1;
}
CMD:cc(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 0)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
	        ClearChat();
	        return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:obj(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 2)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
		    ShowPlayerDialog(playerid,6,DIALOG_STYLE_LIST,"Выдать объект игроку","\
			[1] Шляпа курицы\n[2] Огонек на голову\n[3] Мигалка на голову\n[4] Черная маска\n[5] Бандана №1\n\
			[6] Бандана №2\n[7] Бандана №3\n[8] Бандана №4\n[9] Бандана №5\n[10] Маска дракона\n\
			[11] Лазер на голову\n[12] Комплект всемогущий\n[13] Попугай на плечо\n[14] Яркий свет\n\
			[15] Большой М4 в руку\n[16] Пенис\n[17] Костюм попугая","Выдать","Закрыть");
   	     	return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:jetpack(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 3)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
		    new string[129];
			SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
			SendClientMessage(playerid, COLOR_GREY, "{c4f0c9}[Qimby DM]{a7e155} Jetpack создан.");
			format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] создал JetPack",PlayerInfo[playerid][pName], playerid);
			SendGodMessage(COLOR_LIGHTRED, string);
   	     	return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
 	return 1;
}
CMD:ainfo(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] > 1)
	{
		if(PlayerInfo[playerid][pLogged] == 1)
		{
  			if(sscanf(params,"d", params[0])) return SendClientMessage(playerid, -1, "Используй: /ainfo [id]");
   			if(params[0] != INVALID_PLAYER_ID)
		    {
				new sendername[MAX_PLAYER_NAME],gp[MAX_PLAYER_NAME], adm, kills, deaths, str[128],sctring[2000];
			 	GetPlayerName(playerid, sendername, sizeof(sendername));
			 	GetPlayerName(params[0], gp, sizeof(gp));
			    adm = cache_get_field_content_int(params[0], "Admin", MYSQL_ARG);
				kills = cache_get_field_content_int(params[0], "Kills", MYSQL_ARG);
				deaths = cache_get_field_content_int(params[0], "Deaths", MYSQL_ARG);
	            format(str,sizeof(str),"\t\t\t%s\n\n",gp);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Admin:      \t\t%d\n",adm);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Kills:      \t\t%d\n",kills);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Deaths:      \t\t%d\n",deaths);
	            strcat(sctring,str);
	            ShowPlayerDialog(playerid,22815,DIALOG_STYLE_MSGBOX,"Информация о игроке",sctring,"Ок","");
			}
    	    return 1;
		}
 		else {SendClientMessage(playerid, COLOR_LIGHTBLUE, "Необходимо авторизоваться!");}
	}
	return 1;
}

forward Start_R_A(playerid);
public Start_R_A(playerid)//Тут мы узнаём статус игрока(зарегистрирова или наоборот)
{
	new rows, fields;
	cache_get_data(rows, fields);
	if(rows)
	{
		new loginmsg[187];
		new name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(loginmsg,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",loginmsg,"Войти","Отмена");
	}
	else
	{
		new loginmsg[230];
		new name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(loginmsg,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {ff0000}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
		ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",loginmsg,"Далее","Отмена");
	}
	return 1;
}

forward Avtoriz(playerid, password[]);
public Avtoriz(playerid, password[])//Тут мы узнаём верные данные он ввёл или нет(Пароль)
{
    new rows, fields;
	cache_get_data(rows, fields);
	if(!rows)
	{
		new loginmsg[187];
		new name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, sizeof(name));
		format(loginmsg,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",loginmsg,"Войти","Отмена");
		SendClientMessage(playerid,-1,"Вы ввели не верный пароль");
		return 1;
	}
	PlayerInfo[playerid][pLogged] = 1;
	for(new i = 0; i < rows;i++)
	{
		Avt(i,playerid);
		SpawnPlayer(playerid);
    	SetPlayerScore(playerid,PlayerInfo[playerid][pKills]);
	}
	SpawnPlayer(playerid);
    SetPlayerScore(playerid,PlayerInfo[playerid][pKills]);
    return 1;
}

stock Avt(i,playerid)
{
    PlayerInfo[playerid][pAdmin] = cache_get_field_content_int(i, "Admin", MYSQL_ARG);
	PlayerInfo[playerid][pKills] = cache_get_field_content_int(i, "Kills", MYSQL_ARG);
	PlayerInfo[playerid][pDeaths] = cache_get_field_content_int(i, "Deaths", MYSQL_ARG);
	PlayerInfo[playerid][pBanned] = cache_get_field_content_int(i, "Banned", MYSQL_ARG);
}

stock Reg(playerid)
{
  	mysql_format(MYSQL_ARG, asd, sizeof(asd), "INSERT INTO `"Baza"` (`Name`, `Password`,`Admin`,`Kills`,`Deaths`,`Banned`) VALUES ('%e', '%e', '%d', '%d', '%d', '%d')",
	PlayerInfo[playerid][pName],
	PlayerInfo[playerid][pPassword],
	PlayerInfo[playerid][pAdmin],
	PlayerInfo[playerid][pKills],
	PlayerInfo[playerid][pDeaths],
	PlayerInfo[playerid][pBanned]);
	mysql_function_query(MYSQL_ARG, asd, false, "", "");
}

stock Save(playerid)
{
  	mysql_format(MYSQL_ARG, asd, sizeof(asd),"UPDATE `"Baza"` SET `Admin` = '%d', `Kills` = '%d', `Deaths` = '%d', `Banned` = '%d' WHERE `Name` = '%e'",
	PlayerInfo[playerid][pAdmin],
	PlayerInfo[playerid][pKills],
	PlayerInfo[playerid][pDeaths],
	PlayerInfo[playerid][pName],
	PlayerInfo[playerid][pBanned]);
	//mysql_tquery(MYSQL_ARG, asd, "", "");
	mysql_function_query(MYSQL_ARG, asd, false, "", "");
}
stock loadtd()
{
    freezedraw0 = TextDrawCreate(204.000000, 155.000000, "_");
	TextDrawBackgroundColor(freezedraw0, 255);
	TextDrawFont(freezedraw0, 1);
	TextDrawLetterSize(freezedraw0, 2.010000, 12.000000);
	TextDrawColor(freezedraw0, -1);
	TextDrawSetOutline(freezedraw0, 0);
	TextDrawSetProportional(freezedraw0, 1);
	TextDrawSetShadow(freezedraw0, 1);
	TextDrawUseBox(freezedraw0, 1);
	TextDrawBoxColor(freezedraw0, -932957596);
	TextDrawTextSize(freezedraw0, 30.000000, 0.000000);

	freezedraw1 = TextDrawCreate(34.000000, 157.000000, "_");
	TextDrawBackgroundColor(freezedraw1, 255);
	TextDrawFont(freezedraw1, 1);
	TextDrawLetterSize(freezedraw1, 0.500000, 2.000000);
	TextDrawColor(freezedraw1, -1);
	TextDrawSetOutline(freezedraw1, 0);
	TextDrawSetProportional(freezedraw1, 1);
	TextDrawSetShadow(freezedraw1, 1);
	TextDrawUseBox(freezedraw1, 1);
	TextDrawBoxColor(freezedraw1, 255);
	TextDrawTextSize(freezedraw1, 201.000000, 0.000000);

	freezedraw2 = TextDrawCreate(88.000000, 160.000000, "Freeze");
	TextDrawBackgroundColor(freezedraw2, 255);
	TextDrawFont(freezedraw2, 1);
	TextDrawLetterSize(freezedraw2, 0.500000, 1.000000);
	TextDrawColor(freezedraw2, -957167105);
	TextDrawSetOutline(freezedraw2, 0);
	TextDrawSetProportional(freezedraw2, 1);
	TextDrawSetShadow(freezedraw2, 1);

	freezedraw3 = TextDrawCreate(82.000000, 175.000000, "Wait");
	TextDrawBackgroundColor(freezedraw3, 255);
	TextDrawFont(freezedraw3, 1);
	TextDrawLetterSize(freezedraw3, 0.900000, 3.000000);
	TextDrawColor(freezedraw3, -1444850177);
	TextDrawSetOutline(freezedraw3, 0);
	TextDrawSetProportional(freezedraw3, 1);
	TextDrawSetShadow(freezedraw3, 1);

	freezedraw4 = TextDrawCreate(46.000000, 200.000000, "Texturs~n~ Loaded");
	TextDrawBackgroundColor(freezedraw4, 255);
	TextDrawFont(freezedraw4, 1);
	TextDrawLetterSize(freezedraw4, 1.000000, 3.000000);
	TextDrawColor(freezedraw4, -1444850177);
	TextDrawSetOutline(freezedraw4, 0);
	TextDrawSetProportional(freezedraw4, 1);
	TextDrawSetShadow(freezedraw4, 1);
	

    Textdraw0 = TextDrawCreate(513.000000,401.000000,"~y~Qimby Project");//ТЕКСДРАВ
    Textdraw1 = TextDrawCreate(536.000000,408.000000,"DM");//ТЕКСДРАВ
    TextDrawAlignment(Textdraw0,0);//ТЕКСДРАВ
    TextDrawAlignment(Textdraw1,0);//ТЕКСДРАВ
    TextDrawBackgroundColor(Textdraw0,0x000000ff);//ТЕКСДРАВ
    TextDrawBackgroundColor(Textdraw1,0x000000ff);//ТЕКСДРАВ
    TextDrawFont(Textdraw0,3);//ТЕКСДРАВ
    TextDrawLetterSize(Textdraw0,0.449999,1.900000);//ТЕКСДРАВ
    TextDrawFont(Textdraw1,0);//ТЕКСДРАВ
    TextDrawLetterSize(Textdraw1,0.799999,2.399999);//ТЕКСДРАВ
    TextDrawColor(Textdraw0,0xffffffff);//ТЕКСДРАВ
    TextDrawColor(Textdraw1,0xa7e155AA);//ТЕКСДРАВ
    TextDrawSetOutline(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetOutline(Textdraw1,1);//ТЕКСДРАВ
    TextDrawSetProportional(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetProportional(Textdraw1,1);//ТЕКСДРАВ
    TextDrawSetShadow(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetShadow(Textdraw1,1);//ТЕКСДРАВ
}
forward UnfreezeSpawn(playerid);
public UnfreezeSpawn(playerid)
{
	//SendClientMessage(playerid, COLOR_WHITE, "текстуры загружены!");
	TextDrawHideForPlayer(playerid,freezedraw0);
	TextDrawHideForPlayer(playerid,freezedraw1);
	TextDrawHideForPlayer(playerid,freezedraw2);
	TextDrawHideForPlayer(playerid,freezedraw3);
	TextDrawHideForPlayer(playerid,freezedraw4);
	TogglePlayerControllable(playerid, true);
	return true;
}
stock loadobj()
{
	//others
    CreateObject(5394, 1894.54, -1382.34, 14.29,   -2.52, 0.00, 113.22);
	CreateObject(19377, 1945.52, -1391.69, 17.84,   0.00, 0.00, 0.00);
	CreateObject(349, 210.58, 1867.76, 28.71,   -27.50, -80.00, 0.00);
	CreateObject(349, 214.58, 1867.84, 28.71,   13.50, -80.00, 180.00);
	CreateObject(5422, -1308.46, 504.83, 12.08,   0.00, 0.00, 0.00);
	//adm zona
	CreateObject(8171, -3236.27, -175.69, 9.67,   0.00, 0.00, 0.00);
	CreateObject(8171, -3276.25, -175.70, 9.67,   0.00, 0.00, 0.00);
	CreateObject(8171, -3316.17, -175.70, 9.67,   0.00, 0.00, 0.00);
	CreateObject(8171, -3355.96, -175.70, 9.67,   0.00, 0.00, 0.00);
	CreateObject(987, -3216.81, -155.28, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.77, -176.05, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -143.35, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -131.39, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -119.47, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -107.56, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3228.72, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3240.66, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3252.61, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3264.53, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3276.47, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3288.43, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3300.35, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3312.28, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3324.21, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3336.13, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3348.09, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3360.06, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3372.01, -107.53, 9.61,   0.00, 0.00, 0.00);
	CreateObject(987, -3375.30, -119.10, 9.61,   0.00, 0.00, 74.16);
	CreateObject(987, -3375.24, -131.12, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -143.07, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -155.02, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -167.01, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -178.93, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -190.89, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -202.83, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -214.82, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -226.73, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3375.24, -238.63, 9.61,   0.00, 0.00, 90.00);
	CreateObject(987, -3364.55, -244.14, 9.61,   0.00, 0.00, 152.46);
	CreateObject(987, -3352.59, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3340.66, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3328.68, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3316.73, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3304.84, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3292.91, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3280.95, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3269.03, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3257.10, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3245.18, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3233.19, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3221.26, -244.13, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3216.81, -184.16, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -196.09, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -208.04, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -219.98, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.81, -231.85, 9.61,   0.00, 0.00, -90.00);
	CreateObject(987, -3216.87, -244.15, 9.61,   0.00, 0.00, 180.00);
	CreateObject(987, -3216.81, -167.05, 9.61,   0.00, 0.00, -90.00);
	CreateObject(984, -3340.68, -135.09, 10.31,   0.00, 0.00, 180.00);
	CreateObject(984, -3340.68, -122.27, 10.31,   0.00, 0.00, 180.00);
	CreateObject(983, -3340.68, -112.67, 10.31,   0.00, 0.00, 180.00);
	CreateObject(983, -3340.66, -110.96, 10.31,   0.00, 0.00, 180.00);
	CreateObject(984, -3348.05, -113.93, 10.31,   0.00, 0.00, 180.00);
	CreateObject(984, -3347.10, -125.47, 10.31,   0.00, 0.00, 90.00);
	CreateObject(984, -3353.48, -119.07, 10.31,   0.00, 0.00, 180.00);
	CreateObject(984, -3360.01, -114.06, 10.31,   0.00, 0.00, 180.00);
	CreateObject(983, -3355.15, -115.31, 10.31,   0.00, 0.00, 149.46);
	CreateObject(983, -3356.77, -121.27, 10.31,   0.00, 0.00, 0.00);
	CreateObject(984, -3359.92, -125.47, 10.31,   0.00, 0.00, 90.00);
	CreateObject(984, -3366.30, -119.06, 10.31,   0.00, 0.00, 0.00);
	CreateObject(983, -3364.72, -122.67, 10.31,   0.00, 0.00, 29.22);
	CreateObject(984, -3363.96, -129.50, 10.31,   0.00, 0.00, 90.00);
	CreateObject(983, -3372.73, -127.32, 10.31,   0.00, 0.00, 47.46);
	CreateObject(984, -3351.16, -129.48, 10.31,   0.00, 0.00, 90.00);
	CreateObject(983, -3346.40, -132.18, 10.31,   0.00, 0.00, -31.80);
	CreateObject(983, -3342.36, -136.21, 10.31,   0.00, 0.00, -31.80);
	CreateObject(983, -3345.81, -141.61, 10.31,   0.00, 0.00, -33.54);
	CreateObject(984, -3354.57, -134.98, 10.31,   0.00, 0.00, 90.00);
	CreateObject(984, -3354.00, -144.28, 10.31,   0.00, 0.00, 90.00);
	CreateObject(983, -3356.74, -142.62, 10.31,   0.00, 0.00, -121.38);
	CreateObject(983, -3356.42, -136.25, 10.31,   0.00, 0.00, -65.34);
	CreateObject(984, -3366.79, -144.28, 10.31,   0.00, 0.00, 90.00);
	CreateObject(983, -3372.24, -144.28, 10.31,   0.00, 0.00, 90.00);
	CreateObject(984, -3364.95, -136.84, 10.31,   0.00, 0.00, 0.00);
	CreateObject(19425, -3359.51, -139.26, 9.67,   0.00, 0.00, 90.00);
	CreateObject(19335, -3355.60, -160.32, 9.78,   0.00, 0.00, 0.00);
	CreateObject(19279, -3355.97, -150.32, 9.88,   0.00, 0.00, 180.00);
	CreateObject(19128, -3366.96, -142.25, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3366.96, -138.29, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3366.96, -134.37, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3366.96, -131.43, 9.65,   0.00, 0.00, 0.00);
	CreateObject(19128, -3370.92, -142.25, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3370.92, -138.29, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3370.92, -134.37, 9.67,   0.00, 0.00, 0.00);
	CreateObject(19128, -3370.92, -131.43, 9.65,   0.00, 0.00, 0.00);
	CreateObject(18980, -3370.21, -136.80, -1.10,   0.00, 0.00, 0.00);
	CreateObject(18980, -3370.55, -135.58, -1.50,   0.00, 0.00, 0.00);
	CreateObject(18980, -3370.45, -138.06, -2.02,   0.00, 0.00, 0.00);
	CreateObject(984, -3346.63, -237.78, 10.31,   0.00, 0.00, 0.00);
	CreateObject(984, -3346.63, -224.98, 10.31,   0.00, 0.00, 0.00);
	CreateObject(984, -3346.63, -212.15, 10.31,   0.00, 0.00, 0.00);
	CreateObject(984, -3358.01, -206.53, 10.31,   0.00, 0.00, 121.14);
	CreateObject(984, -3369.35, -212.33, 10.31,   0.00, 0.00, 113.04);
	CreateObject(983, -3343.76, -142.36, 10.31,   0.00, 0.00, -74.58);
	CreateObject(983, -3362.93, -132.24, 10.31,   0.00, 0.00, 34.56);
	CreateObject(711, -3260.79, -111.67, 15.62,   0.00, 0.00, 0.00);
	CreateObject(711, -3260.79, -123.81, 15.62,   0.00, 0.00, 0.00);
	CreateObject(711, -3260.79, -133.67, 15.62,   0.00, 0.00, 0.00);
	CreateObject(711, -3331.46, -111.69, 15.62,   0.00, 0.00, 0.00);
	CreateObject(711, -3331.46, -123.81, 15.62,   0.00, 0.00, 0.00);
	CreateObject(711, -3331.46, -133.67, 15.62,   0.00, 0.00, 0.00);
	    //veh adm
    CreateVehicle(522, -3361.9622, -215.7207, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3362.9148, -216.2157, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3363.8533, -216.7021, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3364.7693, -217.1018, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3365.5178, -217.6212, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3366.4258, -218.0403, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3367.2983, -218.4420, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3368.3479, -218.8783, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3369.3108, -219.2431, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3367.6257, -221.8664, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3366.7124, -221.3961, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3365.7747, -220.8681, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3364.8989, -220.3738, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3364.0315, -219.7581, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3363.3062, -219.1482, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3362.3850, -218.5983, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3361.4402, -218.0106, 10.1804, -158.1600, -1, -1, 100);
	CreateVehicle(522, -3372.1609, -292.5380, 162.6915, 0.0000, -1, -1, 100);
	CreateVehicle(487, -3281.8191, -232.9370, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3294.4841, -232.9370, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3307.1384, -232.9370, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3319.7251, -232.9370, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3309.4392, -220.9181, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3296.6653, -220.9181, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(487, -3283.7192, -220.9181, 10.8456, -25.0000, -1, -1, 100);
	CreateVehicle(571, -3346.5381, -110.3846, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3345.0583, -110.3846, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3343.6047, -110.3846, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3342.0186, -110.3846, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3345.8865, -112.9288, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3344.2866, -112.9288, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(571, -3342.7449, -112.9288, 9.9800, 180.0000, -1, -1, 100);
	CreateVehicle(520, -3322.5176, -116.4324, 11.3390, 155.0000, -1, -1, 100);
	CreateVehicle(520, -3312.1965, -116.4324, 11.3390, 155.0000, -1, -1, 100);
	CreateVehicle(520, -3301.5996, -116.4324, 11.3390, 155.0000, -1, -1, 100);
	CreateVehicle(520, -3291.0244, -116.4324, 11.3390, 155.0000, -1, -1, 100);
	CreateVehicle(520, -3280.6990, -116.4324, 11.3390, 155.0000, -1, -1, 100);
	CreateVehicle(539, -3252.4187, -115.8781, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3248.7039, -116.2780, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3245.1448, -116.4153, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3250.9446, -121.3825, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3247.2449, -121.4821, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3243.2993, -121.5107, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3241.1072, -116.3026, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3245.6929, -126.8187, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3249.5203, -126.3341, 11.7792, 175.6200, -1, -1, 100);
	CreateVehicle(539, -3247.9824, -130.4611, 11.7792, 175.3800, -1, -1, 100);
	CreateVehicle(568, -3224.6726, -233.6406, 10.4622, 0.0000, -1, -1, 100);
	CreateVehicle(568, -3227.1831, -233.6059, 10.4622, 0.0000, -1, -1, 100);
	CreateVehicle(568, -3229.6375, -233.5513, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3227.1831, -233.6059, 10.4622, 0.0000, -1, -1, 100);
	CreateVehicle(568, -3232.1479, -233.5165, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3230.8723, -238.2617, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3228.4810, -238.3171, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3225.9487, -238.4717, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3223.4104, -238.6452, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3233.4211, -238.3034, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3230.7876, -228.4882, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3228.3542, -228.7833, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3225.8835, -229.0653, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3227.0911, -225.0592, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3229.4668, -224.8076, 10.4622, -0.0600, -1, -1, 100);
	CreateVehicle(568, -3228.3313, -220.5982, 10.4622, -0.0600, -1, -1, 100);
	//DM 3oHa 51
	CreateObject(19377, 96.69, 1921.13, 16.80,   0.00, 0.00, 0.00);
	CreateObject(19377, 213.83, 1875.62, 11.16,   0.00, 0.00, 90.00);
	CreateObject(19380, 269.16, 1884.05, 16.40,   0.00, 90.00, 0.00);
	CreateObject(3279, 196.99, 1894.11, 16.82,   0.00, 0.00, 0.00);
	CreateObject(3279, 192.14, 1814.93, 16.82,   0.00, 0.00, 0.00);
	CreateObject(3279, 261.14, 1838.59, 18.22,   7.32, -57.00, 2.40);
	CreateObject(19357, 245.73, 1863.13, 19.53,   0.00, 90.00, 215.76);
	//-------------------------------------->><<
	//DM 3oHa [ABuA]
	CreateObject(19357, -1366.84, 514.28, 11.37,   0.00, 0.00, 90.00);
	CreateObject(19377, -1324.63, 515.13, 9.05,   0.00, 0.00, 90.00);
	CreateObject(19357, -1347.93, 499.30, 18.82,   0.00, 0.00, 90.00);
	CreateObject(19377, -1335.40, 487.32, 10.81,   0.00, 0.00, 90.00);
	CreateObject(19377, -1420.57, 514.25, 11.88,   0.00, 0.00, 90.00);
	CreateObject(19377, -1410.97, 514.25, 11.88,   0.00, 0.00, 90.00);
	CreateObject(19377, -1401.39, 514.25, 11.88,   0.00, 0.00, 90.00);
	CreateObject(19377, -1410.97, 509.12, 17.02,   0.00, 90.00, 90.00);
	CreateObject(19377, -1420.57, 509.12, 17.02,   0.00, 90.00, 90.00);
	CreateObject(19377, -1401.39, 509.12, 17.02,   0.00, 90.00, 90.00);
	CreateObject(19377, -1446.10, 506.24, 11.98,   0.00, 0.00, 0.00);
	CreateObject(19377, -1446.10, 496.59, 11.98,   0.00, 0.00, 0.00);
	CreateObject(19377, -1422.17, 496.20, 2.82,   0.00, 0.00, 0.00);
	CreateObject(19377, -1422.15, 493.95, 2.82,   0.00, 0.00, 0.00);
	CreateObject(5422, 1130.18, 1291.74, 30.84,   0.00, -20.00, 180.00);
	//end
	return true;
}
stock SendAdminMessage(color, string[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pAdmin] >= 1)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
}
stock SendGodMessage(color, string[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pAdmin] >= 1)
			{
   			 if(god[i] == 1)
   			 {
					SendClientMessage(i, color, string);
				}
			}
		}
	}
}
stock SendMessageToAll(color, string[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(IsPlayerConnected(i))
		{
			SendClientMessage(i, color, string);
		}
	}
}
stock ClearChat()
{
	SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_WHITE, "");
    SendMessageToAll(COLOR_LIGHTRED, "Администратор очистил чат!");
	return 1;
}
stock ABroadCast(color,const string[],level)
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pAdmin] >= level) SendClientMessage(i, color, string);
		}
	}
	return true;
}
