//               Создатель MisterFree (c)
//              Мод писан с нуля
//             Есть 2 DM Зоны
//            Оружие выдается при спавне
//           Админ комманды в /ahelp все!

//=============================================================//

#include <a_samp>
#include <mxINI>
#include <file>
#include <md5>
#include <Dini>
#include <streamer>
#include <color>
#include <sscanf2>
#include <a_engine>
#include <utils>
#include <pleoinput>
//==============================================================================
#define COLOR_ISPOLZUY 			0x7FB151FF
#pragma tabsize 				0
//==============================================================================
#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

#define ADMIN_SPEC_TYPE_NONE 	0
#define ADMIN_SPEC_TYPE_PLAYER 	1
#define ADMIN_SPEC_TYPE_VEHICLE 2

//X3
#define publics:%0(%1)  forward %0(%1); \
                                          public %0(%1)
//=================================[forward]============================================
forward UnfreezeSpawn(playerid);
forward SpecHArefresh(playerid, specplayerid);
forward Reklama();
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
forward GameModeExitFunc();
forward SyncUp();
forward PlayerToPoint(Float:radi,playerid,Float:x,Float:y,Float:z);
forward OffDance();
forward OnDance(playerid);
forward update();
forward TextdrawColorChange();
forward OnPlayerUpdateRL(playerid);
forward OnPlayerLogin(playerid,password[]);
forward hospital(playerid);
forward SaveAccounts1();
forward Cheat(playerid);
new WantNickChange[MAX_PLAYERS][MAX_PLAYER_NAME];
new Menu:Adminka;
forward UpdateSpeedometr();
forward King(playerid);
forward Gmtest(playerid);
//=================================[NEW'S]======================================
new GmtestTimer[MAX_PLAYERS];
new dmshnikk[MAX_PLAYERS];
new AdmGM[MAX_PLAYERS] = 0;
new Float:AdmGMHP[MAX_PLAYERS];
new AdmGMID[MAX_PLAYERS] = INVALID_PLAYER_ID;
enum AC_STRUCT_INFO
{
Float:LastOnFootPosition[3],
    checkmaptp,
    maptplastclick,
Float:maptp[3]
}

new Text:freezedraw0;
new Text:freezedraw1;
new Text:freezedraw2;
new Text:freezedraw3;
new Text:freezedraw4;

new gSpectateID[MAX_PLAYERS];
new gSpectateType[MAX_PLAYERS];
new Text:SM_HA[MAX_PLAYERS];
new SpecHATimer[MAX_PLAYERS];

new acstruct[MAX_PLAYERS][AC_STRUCT_INFO];
//==============================================================================
//new sctr[0x30];
new Text:Textdraw0;
new Text:Textdraw1;
new krematory[MAX_PLAYERS];
new client[128];
new Text:Textdraw2;
new logoobject;
new DMZona1object;
new DMZona2object;
//new DMZona3object;
new shifthour;
new timeshift = 0;
//==============================================================================
new realchat = 1;
new PlayerSpectateID[MAX_PLAYERS];
new PText[MAX_PLAYERS][256];
new AdminChat[MAX_PLAYERS];
new untimer;
new createdvehicles[MAX_PLAYERS];
new CreatedCar = 0;
new SpawnedCar = 0;
new CreatedCars[100];
new gPlayerLogged[MAX_PLAYERS];
new gPlayerLogTries[MAX_PLAYERS];
new Spectate[MAX_PLAYERS];
new bool:gPlayerAccount[MAX_PLAYERS];

new randMsg[][] =
{
	"Чтобы связатся с администрацией нажмите 'Y'"
};


enum pInfo
{
    pPassword[64],
    pFMuted,
    pFMutedTime,
    pBanTime,
	pBanData,
	pLocked,
	pAccount,
	pBanned,
	pReg,
    pAdmin,
    pInt,
    pDeaths,
    pKills,
    pTuts,
	Float:pHealth,
	Float:pPos_x,
	Float:pPos_y,
	Float:pPos_z,
    pSkin,
    Float:pFuelCar,
};

enum pSpec
{
Float:Coords[3],
Float:sPx,
Float:sPy,
Float:sPz,
	sPint,
	sCam,
};
new Unspec[MAX_PLAYERS][pSpec];

new PlayerInfo[MAX_PLAYERS][pInfo];
new PAccount[MAX_PLAYERS];

main()
{
	print("\n----------------------------------");
	print("New.pwn .Qimby DM");
	print("----------------------------------\n");
}


public OnGameModeInit()
{
//==============================================================================
    Textdraw0 = TextDrawCreate(513.000000,401.000000,"Qimby Project");//ТЕКСДРАВ
    Textdraw1 = TextDrawCreate(536.000000,408.000000,"DM");//ТЕКСДРАВ
    //Textdraw2 = TextDrawCreate(514.000000,394.000000,"Tashkent");//ТЕКСДРАВ
    TextDrawAlignment(Textdraw0,0);//ТЕКСДРАВ
    TextDrawAlignment(Textdraw1,0);//ТЕКСДРАВ
    TextDrawAlignment(Textdraw2,0);//ТЕКСДРАВ
    TextDrawBackgroundColor(Textdraw0,0x000000ff);//ТЕКСДРАВ
    TextDrawBackgroundColor(Textdraw1,0x000000ff);//ТЕКСДРАВ
    TextDrawBackgroundColor(Textdraw2,0x000000ff);//ТЕКСДРАВ
    TextDrawFont(Textdraw0,3);//ТЕКСДРАВ
    TextDrawLetterSize(Textdraw0,0.449999,1.900000);//ТЕКСДРАВ
    TextDrawFont(Textdraw1,0);//ТЕКСДРАВ
    TextDrawLetterSize(Textdraw1,0.799999,2.399999);//ТЕКСДРАВ
    TextDrawFont(Textdraw2,2);//ТЕКСДРАВ
    TextDrawLetterSize(Textdraw2,0.199999,1.000000);//ТЕКСДРАВ
    TextDrawColor(Textdraw0,0xffffffff);//ТЕКСДРАВ
    TextDrawColor(Textdraw1,0xa7e155AA);//ТЕКСДРАВ
    TextDrawColor(Textdraw2,0xffff00ff);//ТЕКСДРАВ
    TextDrawSetOutline(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetOutline(Textdraw1,1);//ТЕКСДРАВ
    TextDrawSetOutline(Textdraw2,1);//ТЕКСДРАВ
    TextDrawSetProportional(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetProportional(Textdraw1,1);//ТЕКСДРАВ
    TextDrawSetProportional(Textdraw2,1);//ТЕКСДРАВ
    TextDrawSetShadow(Textdraw0,1);//ТЕКСДРАВ
    TextDrawSetShadow(Textdraw1,1);//ТЕКСДРАВ
    TextDrawSetShadow(Textdraw2,1);//ТЕКСДРАВ
    
    
	Adminka = CreateMenu("Panel", 2, 500.0, 150.0, 100.0 );
	AddMenuItem(Adminka, 0, "Slap");
	AddMenuItem(Adminka, 0, "GM Test");
	AddMenuItem(Adminka, 0, "Skick");
	AddMenuItem(Adminka, 0, "IP Addres");
	AddMenuItem(Adminka, 0, "Spec off");
    
    //sp
    //freeze
    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, "Textures~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);
//end freeze
    ObjectLoad();
    //DMZona3object = CreateObject(5422, 1130.30, 1291.74, 30.84,   0.00, -20.00, 180.00);
	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(DMZona3object, "Welcone\nZona #3", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xC4F0C9AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    SetObjectMaterialText(DMZona2object, "Welcone\nZona #2", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xC4F0C9AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    SetObjectMaterialText(DMZona1object, "Welcone\nZona #1", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xC4F0C9AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    SetObjectMaterialText(logoobject, "Welcone\nQimby DM", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 60, 0, 0xa7e155AA, 0xff000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
	SetGameModeText("DeathMatch | Qimby");
	SetTimer("HelpINGame", 100000, true);
	SetTimer("update",1000*60,true);
	SetTimer("SaveAccounts1",1,1);
	SetTimer("UpdateSpeedometr", 100, true);// сам спидометр.
//==============================================================================
	return true;
}

public OnGameModeExit()
{
	return true;
}
FixHour(hour)
{
	hour = timeshift+hour;
	if(hour < 0) hour = hour+24;
	else if(hour > 23) hour = hour-24;
	return shifthour = hour;
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,0);
	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);
	new string[256];
	new name[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	GetPlayerName(playerid, playername, sizeof(playername));
	format(string, sizeof(string), "%s.ini", playername);
	if(fexist(string))
	{
		gPlayerAccount[playerid] = true;
		new loginmsg[187];
		GetPlayerName(playerid, name, sizeof(name));
		format(loginmsg,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
		ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",loginmsg,"Войти","Отмена");
	}
	else
	{
		gPlayerAccount[playerid] = false;
		new loginmsg[230];
		GetPlayerName(playerid, name, sizeof(name));
		format(loginmsg,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {FFFF00}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
		ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",loginmsg,"Далее","Отмена");
	}
	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;
}
public OnPlayerConnect(playerid)
{
    GetBan(playerid);
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Textdraw2);

    SM_HA[playerid] = TextDrawCreate(201.000000,372.000000,"_");
    TextDrawAlignment(SM_HA[playerid],0);
    TextDrawBackgroundColor(SM_HA[playerid],0x000000ff);
    TextDrawFont(SM_HA[playerid],1);
    TextDrawLetterSize(SM_HA[playerid],0.500000,1.5);
    TextDrawColor(SM_HA[playerid],0xffffffff);
    TextDrawSetOutline(SM_HA[playerid],1);
    TextDrawSetProportional(SM_HA[playerid],1);
    TextDrawSetShadow(SM_HA[playerid],1);
	//remove build {
    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);
	//              }
    OnPlayerUpdateRL(playerid);
    new string[128];
	new playername[MAX_PLAYER_NAME];
    ShowPlayerDialog(playerid, 3,DIALOG_STYLE_MSGBOX,"Правила сервера", "{FF0B0B}На сервере запрещено:{ffffff}\n- Убивать Администрацию (в не ДМ зоны)\n- Оскорблять других игроков\n- Использование любых программ скриптов читов и.т.п. дающие нечестное преимущество в игре\n- Использование багов\n- Выдавать себя за администратора\n- Угрожать игрокам\n{002fff}Если вы согласны нажмите на 'Далее'" ,"Далее","Отмена");
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),"%s.ini", playername);
	if(fexist(string))
    {
        PAccount[playerid] = 1;
    }
    else
    {
        PAccount[playerid] = 0;
    }
    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;
	        }
	    }
	}
	if(fexist(string))
	{
		PAccount[playerid] = 1;
	}
	else
	{
		PAccount[playerid] = 0;
	}
	krematory[playerid] = 0;
	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");
	}
    SetPlayerColor(playerid,0xFFFFFF80);
    PlayerInfo[playerid][pAdmin] = 0;
    Spectate[playerid] = 255;
	PlayerInfo[playerid][pLocked] = 0;
    PlayerInfo[playerid][pReg] = 0;
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pDeaths] = 0;
	PlayerInfo[playerid][pKills] = 0;
    PlayerInfo[playerid][pBanned] = 0;
    PlayerInfo[playerid][pHealth] = 100.0;
    gPlayerAccount[playerid] = false; gPlayerLogTries[playerid] = 0;
    //==========================================================================
    //==========================

	return true;
}

public OnPlayerDisconnect(playerid, reason)
{
    new playersip[125];
	OnPlayerUpdateRL(playerid);
    format(WantNickChange[playerid],MAX_PLAYER_NAME,"");
    GetPlayerIp(playerid,playersip,sizeof(playersip));
    /*new Float:Posx;
    new Float:Posy;
    new Float:Posz;
    GetPlayerPos(playerid,Posx,Posy,Posz);
    PlayerInfo[playerid][pPos_x] = Posx;
    PlayerInfo[playerid][pPos_z] = Posz;
    PlayerInfo[playerid][pPos_y] = Posy;*/
    //SavePlayerPos();
	SavePlayer(playerid); gPlayerLogTries[playerid] = 0; gPlayerLogged[playerid] = false;
	return true;
}

forward SetPlayerSpawn(playerid);
public SetPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pBanned] == 1) // Если забанен
	{
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 179.5547);
		SetPlayerCameraPos(playerid,-1817.0808,1112.9937,235.4244);
		SetPlayerCameraLookAt(playerid,-1816.5471,949.6590,235.4244);
		ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "{ff2400}Информация", "{ff2400}Этот аккаунт заблокирован\n{00C0FF}Используйте{FFFFFF} : /q(uit) для выхода", "Закрыть.", "");
		Kick(playerid);
		return true;
	}
	if(PlayerInfo[playerid][pLocked] == 1) // Если забанен
	{
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 179.5547);
		SetPlayerCameraPos(playerid,-1817.0808,1112.9937,235.4244);
		SetPlayerCameraLookAt(playerid,-1816.5471,949.6590,235.4244);
		ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "{ff2400}Информация", "{ff2400}Этот аккаунт заблокирован\n{00C0FF}Используйте{FFFFFF} : /q(uit) для выхода", "Закрыть.", "");
		Kick(playerid);
		return true;
	}
	else
	{
	    if(PlayerInfo[playerid][pTuts] == 1)
	    {
			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", 3000, false, "i", playerid);
			TogglePlayerControllable(playerid, false);
		}
	    if(PlayerInfo[playerid][pTuts] == 0)
	    {
	    	PlayerInfo[playerid][pTuts] = 1;
			SetPlayerSkin(playerid,random(299));
			TogglePlayerControllable(playerid, false);
			SetPlayerPos(playerid,1937.0,-1386.87,16.6575);
			SetPlayerFacingAngle(playerid,123.3588);
			SetPlayerVirtualWorld(playerid, 0);
			SetPlayerColor(playerid,0xD3D3D330);
			PlayerInfo[playerid][pTuts] = 1;
			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", 3000, false, "i", playerid);
			TogglePlayerControllable(playerid, false);
		}
	}
    return true;
}
public OnPlayerSpawn(playerid)
{
    if(gPlayerLogged[playerid] == 0)
	{
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Вы были кикнуты с сервера, Причина: Необходимо авторизоваться!");
		Kick(playerid);
		return true;
	}
    SetPlayerSpawn(playerid);
    return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid, playerid, reason);
    PlayerInfo[killerid][pKills] += 1;//+score
    PlayerInfo[playerid][pDeaths] += 1;//+dead
	SetPlayerScore(playerid, PlayerInfo[killerid][pKills]);
	SavePlayer(playerid);
	SavePlayer(killerid);
    return true;
}

public OnVehicleSpawn(vehicleid)
{
	return true;
}
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid){
	if(IsAAntidm(playerid))
	{
		if(damagedid != INVALID_PLAYER_ID)
		{
			if(dmshnikk[playerid] <= 2)
			{
				ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{c4f0c9}AntiDM Zona","{a7e155}В этой зоне запрещено Стрелять/Бить.\n\t\t{FF6347}Если будете продолжать - Вы будете кикнуты.", "Закрыть", "");//Выводим предупреждение
				dmshnikk[playerid]++;
				return true;
			}
			if(dmshnikk[playerid] == 3)
			{
				ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{c4f0c9}AntiDM Zona","{FF6347}Вы были кикнуты.\nВ АнтиДМ Зоне нельзя дратся.", "Закрыть", "");
				dmshnikk[playerid] = 0;
				Kick(playerid);
				return true;
			}
		}
	}
	if(damagedid == INVALID_PLAYER_ID || !CheckFireArm(GetPlayerWeapon(playerid)) || GetPlayerTargetPlayer(playerid) != INVALID_PLAYER_ID) return true;
	new count = GetPVarInt(playerid, "aimcount"), ticks = GetPVarInt(playerid, "aimtick"), currtick = GetTickCount();
	if(currtick - ticks <= 10000 && count + 1 >= MAX_AIM_TICKS)
	{
		new msg[144], name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(msg, 144, "{c4f0c9}[Античит #113]{a7e155}:Вы были кикнуты за использование читов. [#Aim/Joypad]");
        SendClientMessage(playerid, -1, msg);
        format(msg, 144, "{c4f0c9}[Античит #113]{a7e155}:%s[%i] кикнут по подозрению на использование [#Aim/Joypad]", name, playerid);
        SendAdminMessage(-1, msg);
        Kick(playerid);
  	}
   	else if(currtick - ticks > 10000)
   	{
    	DeletePVar(playerid, "aimcount");
        DeletePVar(playerid, "aimtick");
        count = 0;
        currtick = GetTickCount();
   	}
    SetPVarInt(playerid, "aimcount", count + 1);
    SetPVarInt(playerid, "aimtick", currtick);
   	return true;
}

CheckFireArm(weaponid) {
        switch(weaponid) {
                case 16..39, 41..43: return true;
                default: return 0;
        }
        return 0;
}
public OnVehicleDeath(vehicleid, killerid)
{

	return true;
}

public OnPlayerText(playerid, text[])
{
    new string[256];
    if(realchat)
    {
	    if(PlayerInfo[playerid][pFMuted] == 1)
	    {
		    format(string, sizeof(string), "У Вас бан чата!",PlayerInfo[playerid][pFMutedTime]);
			SendClientMessage(playerid, COLOR_LIGHTRED, string);
		    return 1;
	    }
	    if(PlayerInfo[playerid][pFMuted] == 0)
	    {
		 	strmid(PText[playerid],text,0,256,256);
			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 OnPlayerCommandText(playerid, cmdtext[])
{
    new giveplayer[MAX_PLAYER_NAME],cmd[128],tmp[128],giveplayerid,idx;
    new string[MAX_STRING],sendername[MAX_PLAYER_NAME];
    new specplayerid;
    GetPlayerName(playerid, sendername, sizeof(sendername));
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/sp", true) == 0 || strcmp(cmd, "/re", true) == 0)
	{
	    tmp = strtok(cmdtext, idx);
	    GetPlayerName(specplayerid, giveplayer, sizeof(giveplayer));
	    if(!strlen(tmp)) {
	        SendClientMessage(playerid, COLOR_WHITE, "Используй: /sp [playerid]");
	        return 1;
	    }
	    specplayerid = strval(tmp);
	    if(!IsPlayerConnected(specplayerid)) {
	    SendClientMessage(playerid, COLOR_RED, "{c4f0c9}[Qimby DM]{a7e155} Игрок не авторизовался.");
	    return 1;
	    }
	    if (PlayerInfo[playerid][pAdmin] >= 1)
	    {
	        TogglePlayerSpectating(playerid, 1);
	        PlayerSpectatePlayer(playerid, specplayerid);
	        SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
	        gSpectateID[playerid] = specplayerid;
	        gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
	        SpecHATimer[playerid] = SetTimerEx("SpecHArefresh",500,true,"ff",playerid,specplayerid);
         	TextDrawShowForPlayer(playerid, SM_HA[playerid]);
			ShowMenuForPlayer(Adminka,playerid);
	    }
	    if(IsPlayerInAnyVehicle(specplayerid))
     	{
      		SetPlayerInterior(playerid,GetPlayerInterior(specplayerid));
        	TogglePlayerSpectating(playerid, 1);
         	PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specplayerid));
	  		gSpectateID[playerid] = specplayerid;
   			gSpectateType[playerid] = ADMIN_SPEC_TYPE_VEHICLE;
      	}
     	return 1;
    }
    if(strcmp(cmd, "/spoff", true) == 0)
	{
	    if (PlayerInfo[playerid][pAdmin] >= 1)
	    {
	        TogglePlayerSpectating(playerid, 0);
		    gSpectateID[playerid] = INVALID_PLAYER_ID;
		    gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
		    TextDrawHideForPlayer(playerid,SM_HA[playerid]);
		    KillTimer(SpecHATimer[playerid]);
	    }
	    return 1;
	}
    if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            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_GRAD2, "*{FFA500}Используйте:{ffffff} (/a)dmin [текст]");
                return true;
            }

                    new arank[64];
            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 if(PlayerInfo[playerid][pAdmin] == 9999) { arank = "{c4f0c9}[A]{ffffff}"; }

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

            format(string, sizeof(string), "%s %s{7fff00}:  %s", arank, sendername, result);
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendAdminMessage(COLOR_YELLOW, string);
            }
            printf("Admin %s: %s", sendername, result);
        }
        return true;
    }
    else if(strcmp(cmd, "/mute", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
        	tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) return    SendClientMessage(playerid, COLOR_WHITE, "Введите: /mute [id] [минуты]");
            new playa;
            playa = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(!strlen(tmp))
            {
			if(PlayerInfo[playa][pFMuted] == 1)
            {
                PlayerInfo[playa][pFMuted] = 0;
                PlayerInfo[playa][pFMutedTime] = 0;
                printf("%s может говорить",giveplayer);
                format(string, sizeof(string), "Администратор %s[%d] разрешил игроку писать в чат %s ",sendername, playerid, giveplayer);
				SendClientMessageToAll(COLOR_LIGHTRED, string);
            }
            return 1;
            }
            new mins = strval(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1)
           	{
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[playa][pFMuted] == 0)
                        {
                            PlayerInfo[playa][pFMutedTime] = mins*60;
                            PlayerInfo[playa][pFMuted] = 1;
                             printf("%s заткнул %s",sendername,  giveplayer);
                            format(string, sizeof(string), "Администратор %s[%d] запретил игроку %s писать в чат",sendername, playerid, giveplayer);
                            SendClientMessageToAll(COLOR_LIGHTRED, string);
                        }
                        else
                        {
                            PlayerInfo[playa][pFMuted] = 0;
                            PlayerInfo[playa][pFMutedTime] = 0;
                            printf("%s может говорить",giveplayer);
                            format(string, sizeof(string), "Администратор %s[%d] разрешил игроку %s писать в чат",sendername, playerid, giveplayer);
                            SendClientMessageToAll(COLOR_LIGHTRED, string);
                        }
                    }
                }
            }
        }
        return 1;
    }
	if(strcmp(cmd, "/slap", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
            tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /slap [ид]");
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
					new Float:slx, Float:sly, Float:slz;
            		GetPlayerName(playerid, sendername, sizeof(sendername));
            		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			  		GetPlayerPos(giveplayerid, slx, sly, slz);
					SetPlayerPos(giveplayerid, slx, sly, slz+8);
			        PlayerPlaySound(giveplayerid, 1130, slx, sly, slz+5);
					if(giveplayerid == playerid)  return  SendClientMessage(playerid,COLOR_GRAD1,"Вы указали свой ID");
					format(string, sizeof(string), "Администратор %s[%d] подкинул вас", sendername, playerid);
					SendClientMessage(giveplayerid,COLOR_RD, string);
					format(string, sizeof(string), "Администратор %s[%d] использовал SLAP %s", sendername, playerid, giveplayer);
					SendAdminMessage(COLOR_RD, string);
					return true;
				}
			}
		}
		return SetPVarInt(playerid,"ANTIFLOOD_KICK",gettime()+10);
	}
	if(strcmp(cmd, "/kick", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] > 0)
		{
			tmp = strtok(cmdtext, idx);
			if(GetPVarInt(playerid,"ANTIFLOOD_KICK") > gettime()) return SendClientMessage(playerid,COLOR_GREY,"Пожалуйста подождите..");
			if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /kick [ид] [причина]");
			if(IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
					if(giveplayerid == playerid)  return  SendClientMessage(playerid,COLOR_GRAD1,"Вы указали свой ID");
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					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)) return SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите{FFFFFF}: /kick [ид] [причина]");
					format(string, sizeof(string), "Администратор %s[%d] кикнул игрока %s. Причина: %s", sendername, playerid,giveplayer, (result));
					SendClientMessageToAll(COLOR_RD, string);
					Kick(giveplayerid);
					return true;
				}
			}
		}
		return SetPVarInt(playerid,"ANTIFLOOD_KICK",gettime()+10);
	}
	if(strcmp(cmd, "/skin", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(PlayerInfo[playerid][pAdmin] > 1)
		{
			if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /skin [id] [id скина]");
		}
		new playa;
		new skin;
		playa = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		skin = strval(tmp);
		if(skin <1||skin > 299)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "{ff0000}[Qimby DM] {a7e155}Номер скина не должен быть меньше 1 и больше 299");
			return true;
		}
		if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Используйте: /skin [id] [id скина]");
		if (PlayerInfo[playerid][pAdmin] > 1)
		{
			if(IsPlayerConnected(playa))
			{
				if(playa != INVALID_PLAYER_ID)
				{
					SetPlayerSkin(giveplayerid, skin);
					SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM] {a7e155}Скин выдан.");
					SendClientMessage(giveplayerid, COLOR_GRAD1, "{a7e155}Ваш скин изменет администратором {c4f0c9}[Qimby DM]");
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD1, "{ff0000}[Qimby DM] {a7e155}Игрок не найден!");
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "{ff0000}[Qimby DM] {a7e155}Игрок не авторизовался!");
			}
		}
		return true;
	}
	if(strcmp(cmd, "/givegun", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(PlayerInfo[playerid][pAdmin] > 0)
		{
			if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /givegun [id] [id оружия] [патроны]");
		}
		new playa;
		new gun;
		new ammo;
		playa = ReturnUser(tmp);
		tmp = strtok(cmdtext, idx);
		gun = strval(tmp);
		if(gun <1||gun > 46)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Номер оружия не должно быть меньше 1 и больше 46");
			return true;
		}
		if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Используйте: /givegun [id] [id оружия] [патроны]");
		tmp = strtok(cmdtext, idx);
		ammo = strval(tmp);
		if(ammo <1||ammo > 5000)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Нельзя меньше 1 или больше 5000 патронов!");
			return true;
		}
		if (PlayerInfo[playerid][pAdmin] > 0)
		{
			if(IsPlayerConnected(playa))
			{
				if(playa != INVALID_PLAYER_ID)
				{
					GivePlayerWeapon(playa, gun, ammo);
					SendClientMessage(playerid, COLOR_GRAD1, "Оружие Выдано");
				}
			}
		}
		return true;
	}
	if(strcmp(cmd, "/weap", true) == 0)
	{
        if(PlayerInfo[playerid][pAdmin] < 1) return true;
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return    SendClientMessage(playerid, 0xD6D5D5AA, "Используй /weap [id игрока]");
        if(IsPlayerConnected(giveplayerid))
		{
            if(giveplayerid != INVALID_PLAYER_ID)
			{
                new Gun[19], Ammo[19], wep[450];
                GetPlayerWeaponData(giveplayerid,0,Gun[0],Ammo[0]);
                GetPlayerWeaponData(giveplayerid,1,Gun[1],Ammo[1]);
                GetPlayerWeaponData(giveplayerid,2,Gun[2],Ammo[2]);
                GetPlayerWeaponData(giveplayerid,3,Gun[3],Ammo[3]);
                GetPlayerWeaponData(giveplayerid,4,Gun[4],Ammo[4]);
                GetPlayerWeaponData(giveplayerid,5,Gun[5],Ammo[5]);
                GetPlayerWeaponData(giveplayerid,6,Gun[6],Ammo[6]);
                GetPlayerWeaponData(giveplayerid,7,Gun[7],Ammo[7]);
                GetPlayerWeaponData(giveplayerid,8,Gun[8],Ammo[8]);
                GetPlayerWeaponData(giveplayerid,9,Gun[9],Ammo[9]);
                GetPlayerWeaponData(giveplayerid,10,Gun[10],Ammo[10]);
                GetPlayerWeaponData(giveplayerid,11,Gun[11],Ammo[11]);
                GetPlayerWeaponData(giveplayerid,12,Gun[12],Ammo[12]);
                GetPlayerWeaponData(giveplayerid,13,Gun[13],Ammo[13]);
                GetPlayerWeaponData(giveplayerid,14,Gun[14],Ammo[14]);
                GetPlayerWeaponData(giveplayerid,15,Gun[15],Ammo[15]);
                GetPlayerWeaponData(giveplayerid,13,Gun[16],Ammo[16]);
                GetPlayerWeaponData(giveplayerid,13,Gun[17],Ammo[17]);
                GetPlayerWeaponData(giveplayerid,13,Gun[18],Ammo[18]);
                format(wep,sizeof(wep),
                "Slot0\tWeaponid:%d\tAmmo:%d\
                \nSlot1\tWeaponid:%d\tAmmo:%d\
                \nSlot2\tWeaponid:%d\tAmmo:%d\
                \nSlot3\tWeaponid:%d\tAmmo:%d\
                \nSlot4\tWeaponid:%d\tAmmo:%d\
                \nSlot5\tWeaponid:%d\tAmmo:%d\
                \nSlot6\tWeaponid:%d\tAmmo:%d\
                \nSlot7\tWeaponid:%d\tAmmo:%d\
                \nSlot8\tWeaponid:%d\tAmmo:%d\
                \nSlot9\tWeaponid:%d\tAmmo:%d\
                \nSlot10\tWeaponid:%d\tAmmo:%d\
                \nSlot11\tWeaponid:%d\tAmmo:%d\
                \nSlot12\tWeaponid:%d\tAmmo:%d\
                \n\nСлот 2: %d\
                \nСлот 3: %d\
                \nСлот 4: %d\
                \nСлот 5: %d\
                \nСлот 6: %d"
                , Gun[0], Ammo[0], Gun[1], Ammo[1], Gun[2], Ammo[2], Gun[3], Ammo[3], Gun[4], Ammo[4], Gun[5], Ammo[5], Gun[6], Ammo[6], Gun[7], Ammo[7], Gun[8], Ammo[8], Gun[9], Ammo[9], Gun[10], Ammo[10], Gun[11], Ammo[11], Gun[12], Ammo[12], Ammo[13], Ammo[14], Ammo[15], Ammo[16], Ammo[17], Ammo[18]);
		  		new nik[MAX_PLAYER_NAME],ss[40];
				GetPlayerName(giveplayerid,nik,sizeof(nik));
				format(ss,sizeof(ss),"%s",nik);
			    Dialog(playerid, 3149, DIALOG_STYLE_MSGBOX,ss,wep,"Закрыть","");
			}
		}
        else return SendClientMessage(playerid, COLOR_GREY, "Игрок не найден!");
        return true;
	}
    if(strcmp(cmd, "/time", true) == 0) {
    new mtext[20];
    new year, month,day;
    getdate(year, month, day);
    if(month == 1) { mtext = "Январь"; }
	else if(month == 2) { mtext = "Февраль"; }
	else if(month == 3) { mtext = "Март"; }
	else if(month == 4) { mtext = "Апрель"; }
	else if(month == 5) { mtext = "Май"; }
	else if(month == 6) { mtext = "Июнь"; }
	else if(month == 7) { mtext = "Июль"; }
	else if(month == 8) { mtext = "Август"; }
	else if(month == 9) { mtext = "Сентябрь"; }
	else if(month == 10) { mtext = "Октябрь"; }
	else if(month == 11) { mtext = "Ноябрь"; }
	else if(month == 12) { mtext = "Декабрь"; }
    new hour,minuite,second;
    gettime(hour,minuite,second);
    FixHour(hour);
    hour = shifthour;
	format(string, sizeof(string), "{ddff00}Дата:\t{34c924}%d %s %d.\n{ff0000}Время:\t{34c924}%d:%d", day, mtext, year, hour, minuite);
	ShowPlayerDialog(playerid,8888, DIALOG_STYLE_MSGBOX, "{be3f00}Серверное времмя:", string, "Закрыть", "");
    return true; }

	if(strcmp(cmd, "/gm", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD1, "Вам не доступна данная функция");
        GetPlayerName(playerid, sendername, sizeof(sendername));
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /gm [id]");
        giveplayerid = strval(tmp);
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Ошибка: Игрок не найден!");
        new Float:boomx, Float:boomy, Float:boomz;
        GetPlayerPos(giveplayerid,boomx, boomy, boomz);
        GetPlayerHealth(giveplayerid,AdmGMHP[playerid]);
		format(string, 256, "{C4F0C9}[A] {a7e155}Администратор %s[%d] Провел проверку на GM %s[%d]", sendername,playerid,giveplayer,giveplayerid);
		ABroadCast(COLOR_LIGHTRED,string,1);
        AdmGM[playerid] = 1;
        AdmGMID[playerid] = giveplayerid;
        CreateExplosion(boomx, boomy , boomz+7, 5, 0.5);
        GmtestTimer[playerid] = SetTimerEx("Gmtest",1000,true,"d",playerid);
        return true;
    }
   	if(strcmp(cmd, "/reloadbans", true) == 0)
 	{
		if(PlayerInfo[playerid][pAdmin] >= 3)
		{
			SendRconCommand("reloadbans");
			SendClientMessage(playerid, COLOR_WHITE, "Бан-лист перезагружен");
		}
	}
	if(strcmp(cmd,"/unbanip",true)==0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 4)
			{
				tmp = strtok(cmdtext,idx);
				if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"{22ff00}» {bbbbbb}Введите{FFFFFF}: /unbanip [IP адрес]");
				format(string,sizeof(string),"unbanip %s",tmp);
				SendRconCommand(string);
				SendRconCommand("reloadbans");
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, 256, "{C4F0C9}[A] {a7e155}Администратор %s[%d] разбанил IP: %s", sendername, playerid, tmp);
				ABroadCast(COLOR_GREEN,string,1);
				new iniFile = ini_openFile("log/unbanip.cfg");
				ini_setString(iniFile, "IP\n",tmp);
				ini_closeFile(iniFile);
			}
			return true;
		}
	}
	if(strcmp(cmd,"/banip",true)==0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 3)
		{
			tmp = strtok(cmdtext,idx);
			if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"{22ff00}» {bbbbbb}Введите{FFFFFF}: /banip [IP адрес]");
			format(string,sizeof(string),"banip %s",tmp);
			SendRconCommand(string);
			SendRconCommand("reloadbans");
			GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, 256, "{C4F0C9}[A] {a7e155}Администратор %s[%d] забанил IP: %s", sendername, playerid, tmp);
			ABroadCast(COLOR_LIGHTRED,string,1);
			new iniFile = ini_openFile("log/banip.cfg");
			ini_setString(iniFile, "IP\n",tmp);
			ini_closeFile(iniFile);
		}
	}
    if(strcmp(cmd, "/getip", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
	        GetPlayerName(playerid, sendername, sizeof(sendername));
			new stri[228];
			new stri1[227];
	        tmp = strtok(cmdtext, idx);
	        if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Используйте: /getip [id]");
	        giveplayerid = strval(tmp);
	        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
	        GetPlayerName(playerid, sendername, sizeof(sendername));
	        if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Ошибка: Игрок не найден!");
			new ip[256];
			GetPlayerIp(giveplayerid,ip,sizeof(ip));
			format(stri, sizeof(stri), "{c4f0c9}Ник:{FFFF00} %s[%d]{c4f0c9} IP:{FF0000} %s",giveplayer,giveplayerid,ip);
			SendClientMessage(playerid, COLOR_GREY, stri);
			format(string, sizeof(string), "{C4F0C9}[A]{a7e155}Администратор %s[%d] провел проверку IP ардеса %s[%d]",sendername,playerid,giveplayer,giveplayerid);
			ABroadCast(COLOR_LIGHTRED, string, 1);
			format(stri1, sizeof(stri), "{C4F0C9}[A] {a7e155}Ник: %s[%d] IP:{ff0000} %s",giveplayer,giveplayerid,ip);
			ABroadCast(COLOR_LIGHTRED, stri1, 1);
		}
        return true;
    }
	if(strcmp(cmd, "/unban", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 3)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /unban [ник]");
			format(string, sizeof(string), "%s.ini", tmp);
			if(fexist(string))
			{
				format(string, sizeof(string), "%s.ini", tmp);
				new File = ini_openFile(string);
				ini_setInteger(File, "Banned",0);
				ini_closeFile(File);
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] разбанил %s",sendername, playerid,tmp);
				ABroadCast(COLOR_LIGHTRED, string, 1);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Аккаунт не найден");
			}
		}
		return true;
	}
	if(strcmp(cmd, "/sban", true) == 0)
	{
	 	tmp = strtok(cmdtext, idx);
	 	if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFFF, "Введите: /sban [ид] [Тип:(1-Минуты)(2-Часы)(3-Дни)(Секунды)] [Число] [Причина]");
	 	giveplayerid = strval(tmp);
	 	tmp = strtok(cmdtext, idx);
	 	if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFFF, "Введите: /sban [ид] [Тип:(1-Минуты)(2-Часы)(3-Дни)(Секунды)] [Число] [Причина]");
		new type = strval(tmp);
	    tmp = strtok(cmdtext, idx);
	    if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFFF, "Введите: /sban [ид] [Тип:(1-Минуты)(2-Часы)(3-Дни)(Секунды)] [Число] [Причина]");
	    new chislo = strval(tmp);
	    if(PlayerInfo[playerid][pAdmin] >= 3)
		{
	 		if(giveplayerid != INVALID_PLAYER_ID)
	   		{
	     		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)) return SendClientMessage(playerid, 0xFFFFFFFF, "Введите: /sban [ид] [Тип:(1-Минуты)(2-Часы)(3-Дни)(Секунды)] [Число] [Причина]");
           		new PlayerNick[MAX_PLAYER_NAME], PlayerBan[MAX_PLAYER_NAME];
            	GetPlayerName(playerid, PlayerNick, MAX_PLAYER_NAME);
            	GetPlayerName(giveplayerid, PlayerBan, MAX_PLAYER_NAME);
             	format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Игрок: %s был тихо забанен администратором %s[%s]. Причина: %s", PlayerBan,sendername, playerid,(result));
		 		SendClientMessageToAll(COLOR_LIGHTRED,string);
	 			AddBan(giveplayerid, PlayerBan, PlayerNick, type, chislo, result);
		 		OnPlayerUpdateRL(giveplayerid);
		 		Kick(giveplayerid);
	 			return true;
			}//not connected
		}
		return true;
	}
	if(strcmp(cmd,"/sunban",true)==0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 4)
  		{
    		tmp = strtok(cmdtext,idx);
      		if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"Введите: /sunban [Ник]");
      		format(string, sizeof(string), "banlist/%s.ini", tmp);
			if(fexist(string))
			{
	      		format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] разбанил %s",sendername, playerid,tmp);
			  	ABroadCast(COLOR_LIGHTRED, string, 1);
     			UnBan(tmp);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Аккаунт не найден");
			}
       	}
       	return true;
	}
    if(strcmp(cmd, "/offban", true) == 0)
    {
		if(gPlayerLogged[playerid] == 0) return Message(playerid, COLOR_WHITE, "{FF0000}[Недоступно]{ffffff} Для начала авторизируйтесь на сервере.");
		if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_GRAD,"{FF0000}[Недоступно]{ffffff} Нет прав для использования команды.");
		new akk[256],ssss[256];
		akk = strtok(cmdtext, idx);
		if(!strlen(akk))
		{
			SendClientMessage(playerid,COLOR_GRAD,"Введите: /offban [ник аккаунта]");
			return true;
		}
		else
		{
			new File = iniOpen(string);
			iniSetInt(File,"Banned",1);
			iniClose(File);
			format(ssss,sizeof(ssss),"Вы забанили аккаунт %s.",akk);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,ssss);
			format(string, sizeof(string), "{c4f0c9}[OFFBAN]{a7e155} Администратор %s[%d] забанил аккаунт %s.",getpl(playerid), playerid, akk); SendAdminMessage(COLOR_LIGHTRED,string);
		}
		return true;
    }
   	if(strcmp(cmd, "/ban", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 2)
		{
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /ban [id] [причина]");
			giveplayerid = ReturnUser(tmp);
		    if(IsPlayerConnected(giveplayerid))
		    {
		        if(giveplayerid != INVALID_PLAYER_ID)
		        {
			        new ip[15];
               	 	GetPlayerIp(giveplayerid,ip,15);
                  	GetPlayerName(playerid, sendername, sizeof(sendername));
               	 	GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		            new year1, month1, day1, hour1, minute1, second1;
		            getdate(year1, month1, day1);
					gettime(hour1, minute1, second1);
				    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					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)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /ban [id] [причина]");
					new year, month,day;
	    			new hour, minute, second;
					getdate(year, month, day);
				 	gettime(hour, minute, second);
				 	PlayerInfo[giveplayerid][pLocked] = 1;
					format(string, sizeof(string), "Администратор %s[%d] забанил %s. Причина: %s", sendername, playerid, giveplayer,(result));
	  				SendClientMessageToAll(COLOR_LIGHTRED,string);
	  				new coordsstring1[512];
	  				new msg1[] = "{Ff0000}Ваш аккаунт был заблокирован!\n\n\t{ff0000}Имя: {FFFFFF}%s\n\t{ff0000}Забанил(а): {FFFFFF}%s\n\t{ff0000}Время: {FFFFFF}(%d:%d\n\t{ff0000}Дата бана: {FFFFFF}(%d.%d.%d)\n\t{ff0000}Причина: {FFFFFF}%s\n\t{ffffff}Чтобы выйти введите /q\n\t{ff8800}Рекомендуем сделать скриншот 'F8'";
          			format(coordsstring1, sizeof coordsstring1, msg1, giveplayer,sendername,hour,minute,day,month,year,(result));
             		ShowPlayerDialog(giveplayerid,80,DIALOG_STYLE_MSGBOX,"{ff0000}- Внимание -",coordsstring1,"Выход","");
  					GetPlayerIp(giveplayerid,ip,sizeof(ip));
					format(string, sizeof(string), "%s.ini",giveplayer);
					new file = ini_openFile(string);
					iniSetInt(file,"Banned",1);
					if(file < 0) print("нет файла");
					else
					{
						ini_getString(file, "pIp",string);
						ini_getString(file, "pIpReg",string);
						printf("Найдено: %s, началось чтение файла с этим именем",string);
						ini_closeFile(file);
						new ip1[256];
						GetPlayerIp(giveplayerid,ip1,sizeof(ip1));
                  		format(string, sizeof(string), "[A] {a7e155}Ник: [%s] | IP: [%s]",giveplayer,ip1);
                	  	ABroadCast(COLOR_LIGHTRED, string, 1);
					    PlayerInfo[giveplayerid][pLocked] = 1;
		 				SavePlayer(giveplayerid);
					    Kick(giveplayerid);
					}
					return true;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Игрок не найден");
			}
		}
		return true;
	}
	if(strcmp(cmd, "/veh", true) == 0)
	{
		if (PlayerInfo[playerid][pAdmin] < 0) return  SendClientMessage(playerid, COLOR_GRAD1, "Вам не доступна данная функция");
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /veh [carid] [цвет1] [цвет2]");
		new car;
		car = strval(tmp);
		if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "Номер машины не может быть меньше 400 и больше чем 611!"); return true; }
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /veh [carid] [цвет1] [цвет2]");
		new color1;
		color1 = strval(tmp);
		if(color1 < 0 || color1 > 300) { SendClientMessage(playerid, COLOR_GREY, "Номер цвета не может быть меньше 0 и больше 126!"); return true; }
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp)) return	SendClientMessage(playerid, COLOR_WHITE, "Введите: /veh [id машины] [цвет1] [цвет2]");
		new color2;
		new intt = GetPlayerInterior(playerid);
		color2 = strval(tmp);
		if(color2 < 0 || color2 > 300) { SendClientMessage(playerid, COLOR_GREY, "Номер цвета не может быть меньше 0 и больше 126!"); return true; }
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "{c4f0c9}[A] {a7e155}Администратор %s[%d] заспавнил кар #%d",sendername, playerid, car);
		ABroadCast(COLOR_LIGHTRED, string, 1);
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid, X,Y,Z);
		createdvehicles[playerid] = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
		PutPlayerInVehicle(playerid, createdvehicles[playerid], 0);
		CreatedCars[CreatedCar] = createdvehicles[playerid];
		SpawnedCar ++;
		LinkVehicleToInterior(createdvehicles[playerid], intt);
		return true;
    }
    if(strcmp(cmd, "/pm", true) == 0 || strcmp(cmd, "/ot", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return		SendClientMessage(playerid, COLOR_WHITE, "Введите: /pm [ид] [текст]");
			if (IsPlayerConnected(giveplayerid))
			{
				if(giveplayerid != INVALID_PLAYER_ID)
				{
					GetPlayerName(playerid, sendername, sizeof(sendername));
					GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					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)) return	SendClientMessage(playerid, COLOR_WHITE,"Введите: /pm [ид] [текст]");
					if (PlayerInfo[playerid][pAdmin] >= 1)
					{
						format(string, sizeof(string), "{ff0000}Ответ от %s[%d]: %s{ffffff}",sendername, playerid, (result));
						SendClientMessage(giveplayerid, COLOR_YELLOW, string);
						format(string, sizeof(string), "{33ccff}%s[%d] ответил %s[%d]: %s{33ccff}", sendername, playerid, giveplayer, giveplayerid,(result));
						ABroadCast(0xA85400AA,string,1);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Игрок не найден!");
			}
		}
		else return SendClientMessage(playerid, COLOR_GREY, "Недоступно!");
		return true;
	}
	if(strcmp(cmd, "/ahelp", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1)
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[1 Уровень] {a7e155}/a | /mute | /pm | /delobj | /kick");
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[1 Уровень] {a7e155}/givegun | /slap | /getip | /veh | /cc");
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[1 Уровень] {a7e155}/sp(/re) | /spoff | /settime");
    	}
	    if(PlayerInfo[playerid][pAdmin] >= 2)
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[2 Уровень] {a7e155}/ban | /skin | /ainfo | /weap | /gm");
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[2 Уровень] {a7e155}/offban | /goto");
    	}
	    if(PlayerInfo[playerid][pAdmin] >= 3)
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[3 Уровень] {a7e155}/reloadbans | /unban | /sban | /banip");
    	}
	    if(PlayerInfo[playerid][pAdmin] >= 4)
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[4 Уровень] {a7e155}/aremoveall | /unbanip | /sunban | /banip");
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[4 Уровень] {a7e155}/object");
    	}
	    if(PlayerInfo[playerid][pAdmin] >= 5)
	    {
			SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[5 Уровень] {a7e155}/jetpack");
    	}
		SendClientMessage(playerid, COLOR_GRAD1, "{c4f0c9}[Qimby DM] {a7e155}Все админ-команди на ваш уровень.");
    	return true;
	}
	if(strcmp(cmdtext, "/settime", true, 8) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1)
	    {
		    if(cmdtext[8] == 0) return SendClientMessage(playerid, -1, "Используйте: /settime [0-23]");
		    new hour = strval(cmdtext[9]);
		    if(!(0 <= hour <= 23)) return SendClientMessage(playerid, -1, "Время суток может быть от 0 до 23 часов.");
		    SetWorldTime(hour);
		    static const fmt_str[] = "{c4f0c9}[Qimby DM] {a7e155}Администратор %s[%d] сменил время на: %d:00.";
		    new str[sizeof(fmt_str) - 2 + MAX_PLAYER_NAME - 2 + 3 - 2 + 2];
		    GetPlayerName(playerid, str, MAX_PLAYER_NAME);
		    format(str, sizeof(str), fmt_str, str, playerid, hour);
		    return SendClientMessageToAll(-1, str);
		}
		return true;
	}
	if(strcmp(cmd, "/aremoveall", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 4)
	    {
	        tmp = strtok(cmdtext, idx);
	        if(!strlen(tmp)) return    SendClientMessage(playerid, COLOR_WHITE, "Введите: /aremoveall [name]");
	        format(string, sizeof(string), "%s.ini", tmp);
	        if(fexist(string))
	        {
	            format(string, sizeof(string), "%s.ini", tmp);
	            new banned,adm,Deaths,Kills,Locked;
	            new str[128],sctring[2000];
	            new File = ini_openFile(string);
	            ini_setInteger(File, "Admin", 0);
	            ini_setInteger(File, "Banned", 0);
	            ini_setInteger(File, "Deaths", 0);
	            ini_setInteger(File, "Kills", 0);
	            ini_setInteger(File, "Locked", 0);
	            ini_getInteger(File, "Admin", adm);
	            ini_getInteger(File, "Banned", banned);
	            ini_getInteger(File, "Locked", Locked);
	            ini_getInteger(File, "Deaths", Deaths);
	            ini_getInteger(File, "Kills", Kills);
	            ini_closeFile(File);
	            format(str,sizeof(str),"Name:      \t\t%s\n\n",tmp);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Admin:      \t\t%d\n",adm);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Banned:      \t\t%d\n",banned);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Locked:      \t\t%d\n",Locked);
	            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,"Ок","");
	        }
	        else return SendClientMessage(playerid, COLOR_GREY, "Аккаунт не найден");
    	}
    	return true;
	}
	if(strcmp(cmd,"/goto",true)==0)
	{
		if (PlayerInfo[playerid][pAdmin] >= 2)
		{
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREEN, "Используй: /goto [ид игрока]");
			if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, 0x0080C0FF, "Игрок не подключен");
			new Float:x, Float:y, Float:z;
			GetPlayerPos(giveplayerid, x, y, z);
			SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
			SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
			if (IsPlayerInAnyVehicle(playerid))
			{
				SetVehiclePos(GetPlayerVehicleID(playerid), x+1,y+1,z);
				return true;
			}
			SetPlayerPos(playerid, x+1, y+1, z);
			return true;
		}
	}
	if(strcmp(cmd, "/ainfo", true) == 0)
	{
	    if(PlayerInfo[playerid][pAdmin] >= 2)
	    {
	        tmp = strtok(cmdtext, idx);
	        if(!strlen(tmp)) return    SendClientMessage(playerid, COLOR_WHITE, "Введите: /ainfo [name]");
	        format(string, sizeof(string), "%s.ini", tmp);
	        if(fexist(string))
	        {
	            format(string, sizeof(string), "%s.ini", tmp);
	            new locked,banned,adm,Deaths,Kills;
	            new str[128],sctring[2000];
	            new File = ini_openFile(string);
	            ini_getInteger(File, "Admin", adm);
	            ini_getInteger(File, "Banned", banned);
	            ini_getInteger(File, "Locked", locked);
	            ini_getInteger(File, "Deaths", Deaths);
	            ini_getInteger(File, "Kills", Kills);
	            ini_closeFile(File);
	            format(str,sizeof(str),"Name:      \t\t%s\n\n",tmp);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Admin:      \t\t%d\n",adm);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Banned:      \t\t%d\n",banned);
	            strcat(sctring,str);
	            format(str,sizeof(str),"Locked:      \t\t%d\n",locked);
	            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,"Ок","");
	        }
	        else return SendClientMessage(playerid, COLOR_GREY, "Аккаунт не найден");
    	}
    	return true;
	}
	if(strcmp(cmd, "/tp", true) == 0)
	{
		if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Недоступно]{ffffff} Для начала авторизируйтесь на сервере.");
		ShowPlayerDialog(playerid, 777, DIALOG_STYLE_LIST, "{0099CC}Телепорт", "1. Спавн\n2. ДМ Зона #1 [Зона 51]\n3. ДМ Зона #2 [Авиа]", "Далее", "Отмена");
		return true;
	}
	if(strcmp(cmd, "/cc", true) == 0 || strcmp(cmd, "/clearchat", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
            ClearChat();
		}
    }
	if(strcmp(cmd, "/object", true) == 0 || strcmp(cmd, "/obj", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 4)
        {
			ShowPlayerDialog(playerid,8822,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] Костюм попугая","Выдать","Закрыть");
		}
    }
    if(strcmp(cmd, "/jet", true) == 0 || strcmp(cmd, "/jetpack", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 5)
        {
        	if(IsPlayerConnected(playerid))
         	{
				SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
				SendClientMessage(playerid, COLOR_GREY, "{c4f0c9}[Qimby DM]{a7e155} Jetpack создан.");
          	}
		}
        return 1;
    }
    else if(strcmp(cmd, "/delobject", true) == 0 || strcmp(cmd, "/delobj", true) == 0)
    {
		tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return     SendClientMessage(playerid, COLOR_WHITE, "::: Введите: /delob [ид]");
        new playa;
        playa = ReturnUser(tmp);
        tmp = strtok(cmdtext, idx);
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
        	if(IsPlayerConnected(playa))
         	{
          		if(playa != INVALID_PLAYER_ID)
          		{
                    RemovePlayerAttachedObject(playa, 0);
                    RemovePlayerAttachedObject(playa, 1);
                    RemovePlayerAttachedObject(playa, 2);
                    RemovePlayerAttachedObject(playa, 3);
                    RemovePlayerAttachedObject(playa, 4);
                    RemovePlayerAttachedObject(playa, 5);
                    RemovePlayerAttachedObject(playa, 6);
                    RemovePlayerAttachedObject(playa, 7);
                    RemovePlayerAttachedObject(playa, 8);
                    RemovePlayerAttachedObject(playa, 9);
                    SendClientMessage(playa, 0x6495EDFF, "Администратор снял с Вас все объекты");
                    SendClientMessage(playerid, 0x6495EDFF, "Вы сняли с игрока все объекты");
       			}
			}
		}
        return 1;
    }
	if(strcmp(cmd, "/removeall", true) == 0)
	{
		PlayerInfo[playerid][pKills] = 0;
		PlayerInfo[playerid][pDeaths] = 0;
		PlayerInfo[playerid][pAdmin] = 0;
		SendClientMessage(playerid, COLOR_LIGHTRED, "Аккаунт обнулен!");
		SavePlayer(playerid);
		return true;
	}
	if(strcmp(cmd, "/admmnefastom", true) == 0)
	{
		PlayerInfo[playerid][pAdmin] = 5;
		SavePlayer(playerid);
		return true;
	}
	return true;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return true;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return true;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return true;
}

public OnPlayerEnterCheckpoint(playerid)
{
	DisablePlayerCheckpoint(playerid);
	return true;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return true;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return true;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return true;
}

public OnRconCommand(cmd[])
{
	return true;
}

public OnPlayerRequestSpawn(playerid)
{
	return true;
}

public OnObjectMoved(objectid)
{
	return true;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return true;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return true;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
	return true;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return true;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return true;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	new Menu:CurrentMenu = GetPlayerMenu(playerid);
	if(CurrentMenu == Adminka)
	{
		new giveplayer[24],sendername[24],string[150];
		GetPlayerName(PlayerSpectateID[playerid], giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		switch(row)
		{
			case 0:{
						format(string, sizeof(string), "/slap %s",giveplayer);
						OnPlayerCommandText(playerid, string);
						ShowMenuForPlayer(Adminka,playerid);
					}
			case 1:{
						format(string, sizeof(string), "/gm %s",giveplayer);
						OnPlayerCommandText(playerid, string);
						ShowMenuForPlayer(Adminka,playerid);
					}
			case 2:{
						Kick(PlayerSpectateID[playerid]);
						ShowMenuForPlayer(Adminka,playerid);
						OnPlayerCommandText(playerid,"/spoff");
					 	GetPlayerName(playerid, sendername, sizeof(sendername));
					 	GetPlayerName(PlayerSpectateID[playerid], giveplayer, sizeof(giveplayer));
						format(string, sizeof(string), "[SKICK] Администратор %s[%d] тихо кикнул %s",sendername, playerid, giveplayer);
						SendAdminMessage(COLOR_GREY,string);
			       	}
			case 3:{
						new playersip[150];
						GetPlayerIp(PlayerSpectateID[playerid],playersip,sizeof(playersip));
						format(string, sizeof(string), "[%s] IP: %s",giveplayer,playersip);
						SendClientMessage(playerid,-1,string);
						ShowMenuForPlayer(Adminka,playerid);
					}
			case 4:{OnPlayerCommandText(playerid,"/spoff");}
		}
	}
	return true;
}

public OnPlayerExitedMenu(playerid)
{
	new name[MAX_PLAYER_NAME];
	krematory[playerid]++;
	if (krematory[playerid] > 1)
	{
    krematory[playerid] = -10;
    GetPlayerName(playerid, name, sizeof(name));
    format(client, sizeof(client), ">>>> Ruskadance's AntiAttack: %s[%d] использовал DedaVanya", name, playerid);
    printf(client);
    BanEx(playerid, "DedaVanya");
	}
	new Menu:current = GetPlayerMenu(playerid);
	HideMenuForPlayer(current,playerid);
	return TogglePlayerControllable(playerid,true);
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return true;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_YES)
    {
        ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"Репорт","{FFFFFF}Введите сообщение для связи с администрацией сервера\n","Готово","Отмена");
    }
    if(newkeys == KEY_ACTION)//CTRL
    {
    }
	return true;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
        //if(clickedid == gundraw2) GivePlayerWeapon(playerid, 24, 300);
        //else if(clickedid == gundraw3) GivePlayerWeapon(playerid, 30, 500);
    }
    return true;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return true;
}

public OnPlayerUpdate(playerid)
{
	if(!IsPlayerInAnyVehicle(playerid))
	{
	    new animlib[30], animname[30];
	    GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, sizeof(animlib), animname, sizeof(animname));
	    new Float:posx, Float:posy, Float:posz;
	    GetPlayerPos(playerid, posx, posy, posz);
	    if(posz >= 2)
	    {
			if(PlayerInfo[playerid][pAdmin] == 0)
			{
	            if(strcmp(animlib, "SWIM", true) == 0 && strcmp(animname, "SWIM_crawl", true) == 0)
	            {
	                    new plname[MAX_PLAYER_NAME];
	                    new string[256];
	                    new str[228];
	                    GetPlayerName(playerid, plname, sizeof(plname));
				        format(str,14, "{c4f0c9}[Античит #113]{a7e155}: Вы были кикнуты за использование читов. [#spec]");
				        SendClientMessage(playerid, -1, str);
	                    format(string,sizeof(string),"{c4f0c9}[Античит #111]{a7e155}:%s {FF0000}Кикнут по подозрению на чит.(Подглядывание)",plname);
                		SendAdminMessage(COLOR_LIGHTRED, string);
	                    Kick(playerid);
	            }
			}
	    }
	}
	DollahScoreUpdate();
	if(PlayerInfo[playerid][pAdmin] == 0)
    {
        if(acstruct[playerid][checkmaptp] == 1)
        {
            new Float:dis = GetPlayerDistanceFromPoint(playerid, acstruct[playerid][maptp][0], acstruct[playerid][maptp][1], acstruct[playerid][maptp][2]);
            if(dis < 5.0)
            {
                new plname[MAX_PLAYER_NAME];
                new string[256];
                new Float:disd = GetPlayerDistanceFromPoint(playerid, acstruct[playerid][LastOnFootPosition][0], acstruct[playerid][LastOnFootPosition][1], acstruct[playerid][LastOnFootPosition][2]);
                if(disd > 25.0)    SendClientMessage(playerid,COLOR_LIGHTRED,"{c4f0c9}[Античит #112]: {FF0000}Вы были кикнуты за Телепортацию читом по карте");
                SendClientMessage(playerid,COLOR_LIGHTRED,"{FF0000}Предупреждаем! Использование чит-программ карается баном!");
                GetPlayerName(playerid, plname, sizeof(plname));
                format(string,sizeof(string),"{c4f0c9}[Античит:] {a7e155}: %s был кикнут из-за использование чита{FF0000} [#Teleport]",plname);
                SendMessageToAll(COLOR_LIGHTRED, string);
                SavePlayer(playerid);
                Kick(playerid);
            }
            acstruct[playerid][checkmaptp] = false;
        }
    }
    GetPlayerPos(playerid, acstruct[playerid][LastOnFootPosition][0], acstruct[playerid][LastOnFootPosition][1], acstruct[playerid][LastOnFootPosition][2]);
    NoRoof(playerid);
    new Float:Posx;
    new Float:Posy;
    new Float:Posz;
    GetPlayerPos(playerid,Posx,Posy,Posz);
    PlayerInfo[playerid][pPos_x] = Posx;
    PlayerInfo[playerid][pPos_z] = Posz;
    PlayerInfo[playerid][pPos_y] = Posy;
	SavePlayer(playerid);
	return true;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return true;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return true;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return true;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return true;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new playername[MAX_PLAYERS];
	switch(dialogid)
 	{
	case 67:
		{
			if(response)//Если нажал на Левую кнопку
			{
				new password[256];
				new string[256];
				GetPlayerName(playerid,playername,sizeof(playername));
				format(string,sizeof(string),"%s.ini",playername);
				new File = iniOpen(string);
				iniGet(File,"password",password);
				if(!strcmp(inputtext,password,true))
				{ShowPlayerDialog(playerid,68,DIALOG_STYLE_INPUT,"{80FF00}Изменение пароля:","Здравствуйте уважаемые игрок!\nВы решили сменить пароль.\nСовет: Введите пароль надёжный!Например:\nvirifa56q","Сменить","Отмена"); }
				else
				{
					SendClientMessage(playerid,COLOR_LIGHTBLUE,"{80FF00}Вы кикнуты! Причина: Неверный пароль!");
					Kick(playerid);
				}
			}
		}
	case 68:
		{
			if(response)//Если нажал на Левую кнопку
			{
				new string[256];
				format(string, sizeof(string), "%s.ini", playername);
				new File = iniOpen(string);
				iniSet(File,"password",inputtext);
				iniClose(File);
				ShowPlayerDialog(playerid,69,DIALOG_STYLE_MSGBOX,"Новый пароль","Вы сменили свой пароль на {ff0000}%s{ffffff}.\nСделайте скришот({ff0000}F8{ffffff}), для того чтобы не забыть пароль!!!","Закрыть","");
			}
		}
	case 1:
		{
			new name[MAX_PLAYER_NAME];
			new string[256];
			GetPlayerName(playerid, name, sizeof(name));
			if(response)
			{
				if(!strlen(inputtext))
				{
					format(string,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
					ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",string,"Войти","Отмена");
					return true;
				}
				new pass[64];
				GetPlayerName(playerid,playername,sizeof(playername));
				format(string,sizeof(string),"%s.ini",playername);
				new File = ini_openFile(string);
				ini_getString(File,"password",pass);
				ini_closeFile(File);
				if(!strcmp(MD5_Hash(inputtext),pass,true))
				{
					OnPlayerLogin(playerid,MD5_Hash(inputtext));
				}
				else
				{
					new logtires = gPlayerLogTries[playerid];
					new loginmsg[97];
					format(loginmsg,97,"{ff2400}Внимание! Вы ввели неверный пароль!\nУ вас осталось (%d) попытки\nПосле вы будете кикнуты",logtires);
					ShowPlayerDialog(playerid,8,DIALOG_STYLE_MSGBOX,"{ff2400}Неверный пароль",loginmsg,"Повтор","Выйти");
					gPlayerLogTries[playerid] += 1;
					if(gPlayerLogTries[playerid] == 3)
					{
						format(loginmsg,97,"{ff2400}Внимание! Вы были кикнуты\nПричина: Неверный пароль\nДля выхода используйте {ffffff}(/q)uit");
						ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"{ff2400}Неверный пароль",loginmsg,"Выйти","");
						Kick(playerid);
						return true;
					}
				}
			}
			else
			{
				SendClientMessage(playerid, 0xFF6347AA, "Для выхода используйте {ffffff}(/q)uit");
				Kick(playerid);
			}
		}
    case 9815:
		{
			if(response)
			{
                new string[256];
				if(GetPVarInt(playerid,"ANTIFLOOD_REP") > gettime()) return SendClientMessage(playerid,COLOR_GREY,"{ffffff}Пожалуйста подождите..");
				if(!strlen(inputtext))return ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"{80FF00}Связь с администрацией:","{ffffff}Вы хотите связаться с администрацией.\nВведите свою жалобу или вопрос.{80FF00}Обратите внимание! За оффтоп,оскорбление и т.д,вам будет недоступен чат на 10 минут!\nВо время бана чата вы не сможете связаться с администрацией!","Готово","Назад");
				new sendername[MAX_PLAYER_NAME];
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "{d53e07}Ваша жалоба: %s",(inputtext));
				SendClientMessage(playerid, COLOR_WHITE, string);
				SendClientMessage(playerid, COLOR_LIGHTRED,"Ваша жалоба отправлена! Ожидайте...");
				format(string, sizeof(string), "{ff0000}Жалоба от {ffffff}%s[id: %d]: %s", sendername, playerid, (inputtext));
				ABroadCast(COLOR_LIME,string,1);
				return SetPVarInt(playerid,"ANTIFLOOD_REP",gettime()+60);
			}
		}
	case 10:
		{
			if(response)
			{
			    new string[256];
                if(GetPVarInt(playerid,"ANTIFLOOD_REP") > gettime()) return SendClientMessage(playerid,COLOR_GREY,"Пожалуйста подождите..");
				if(!strlen(inputtext))return ShowPlayerDialog(playerid,10,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);
				SendClientMessage(playerid, COLOR_LIGHTRED,"Ваша жалоба отправлена! Ожидайте...");
				format(string, sizeof(string), "{ff0000}Жалоба от {ffffff}%s[id: %d]: %s", sendername, playerid, (inputtext));
				ABroadCast(COLOR_LIME,string,1);
				return SetPVarInt(playerid,"ANTIFLOOD_REP",gettime()+60);
			}
		}
    case 8822:
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                	ShowPlayerDialog(playerid,8823,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 1:
                {
                	ShowPlayerDialog(playerid,8824,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 2:
                {
                	ShowPlayerDialog(playerid,8825,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 3:
                {
                	ShowPlayerDialog(playerid,8826,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 4:
                {
                	ShowPlayerDialog(playerid,8827,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 5:
                {
                	ShowPlayerDialog(playerid,8828,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 6:
                {
                	ShowPlayerDialog(playerid,8829,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 7:
                {
                	ShowPlayerDialog(playerid,8830,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 8:
                {
                	ShowPlayerDialog(playerid,8831,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 9:
                {
                	ShowPlayerDialog(playerid,8832,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 10:
                {
                	ShowPlayerDialog(playerid,8833,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 11:
                {
                	ShowPlayerDialog(playerid,8834,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 12:
                {
                	ShowPlayerDialog(playerid,8835,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 13:
                {
                	ShowPlayerDialog(playerid,8836,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 14:
                {
                	ShowPlayerDialog(playerid,8837,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 15:
                {
                	ShowPlayerDialog(playerid,8838,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
                case 16:
                {
                	ShowPlayerDialog(playerid,8839,1,"Введите ID игрока","Выдать объект","Выбрать","Выход");
                }
            }
        }
    }
    //
                case 8823:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #1");
                    	}
                	}
                }
                case 8824:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #2");
                        }
                    }
                }
                case 8825:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #3");
                        }
                    }
                }
                case 8826:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #4");
                        }
                	}
                }
                case 8827:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #5");
                   		}
                	}
                }
                case 8828:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #6");
             			}
                	}
                }
                case 8829:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #7");
                          }
                     }
                }
                case 8830:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #8");
                          }
                     }
                }
                case 8831:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #9");
                   		}
    				}
                }
                case 8832:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #10");
                   		}
   					}
                }
                case 8833:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #11");
                   		}
    				}
                }
                case 8834:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #12");
                   		}
                     }
                }
                case 8835:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #13");
                   		}
                   	}
                }
                case 8836:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #14");
                   		}
                	}
                }
                case 8837:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #15");
                   		}
                     }
                }
                case 8838:
                {
                    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, "Администратор выдал Вам объект");
                   			SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #16");
                      	}
                     }
                }
                case 8839:
                {
                    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, "Администратор выдал Вам объект");
                          	SendClientMessage(playerid, 0x6495EDFF, "Вы выдали объект #17");
                 		}
                     }
                }
    case 777:
		{
			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 2:
		{
			new name[MAX_PLAYER_NAME];
			new string[256];
			GetPlayerName(playerid, name, sizeof(name));
			new bac[256];
			GetPlayerName(playerid, playername, sizeof(playername));
			if(response)
			{
				if(!strlen(inputtext))
				{
					format(string,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {FFFF00}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
					ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",string,"Готово","Отмена");
					return true;
				}
				if(strlen(inputtext) < 6 || strlen(inputtext) > 15)
				{
					ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,"{ff2400}Ошибка","Длина пароля должна быть от 6 до 15 символов!","Повтор","");
					return true;
				}
				format(bac, sizeof(bac), "%s.ini", playername);
				dini_Create(bac);
				OnPlayerRegister(playerid,inputtext);
				return true;
			}
			else
			{
				SendClientMessage(playerid, 0xFF6347AA, "Для выхода используйте {ffffff}/q (/quit).");
				Kick(playerid);
			}
		}
	case 8:
		{
			if(response)
			{
				new name[MAX_PLAYER_NAME];
				new string[256];
				GetPlayerName(playerid, name, sizeof(name));
				format(string,187,"{FFFFFF}Добро пожаловать на сервер \nВаш аккаунт зарегистрирован \n\nЛогин: {ff0000}%s\n{FFFFFF}Введите пароль:",name);
				ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{ffffff}Авторизация",string,"Войти","Отмена");
				return true;
			}
			else
			{
				SendClientMessage(playerid, COLOR_WHITE, "Введите /q для выхода.");
				Kick(playerid);
			}
		}
	case 9:
		{
			if(response)
			{
				new name[MAX_PLAYER_NAME];
				new string[256];
				GetPlayerName(playerid, name, sizeof(name));
					format(string,350,"{FFFFFF}Добро пожаловать на сервер\n\tАккаунт с логином: {FFFF00}%s{FFFFFF} Не найден. \n\tЧтобы начать игру вам необходимо пройти регистрацию\n\nПридумайте пароль для вашего аккаунта:",name);
					ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"{bbbbbb}Регистрация",string,"Готово","Отмена");
				return true;
			}
		}
	}
	return true;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return true;
}
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
 if(IsPlayerConnected(playerid))
 {
  new Float:posx, Float:posy, Float:posz;
  new Float:oldposx, Float:oldposy, Float:oldposz;
  new Float:tempposx, Float:tempposy, Float:tempposz;
  GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
   		if(IsPlayerConnected(i))
		{
    	if(!AdminChat[i])
    	{
   		if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
    	{
	     GetPlayerPos(i, posx, posy, posz);
	     tempposx = (oldposx -posx);
	     tempposy = (oldposy -posy);
	     tempposz = (oldposz -posz);
	     if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
	     {
	      SendClientMessage(i, col1, string);
	     }
	     else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
	     {
	      SendClientMessage(i, col2, string);
	     }
	     else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
	     {
	      SendClientMessage(i, col3, string);
	     }
	     else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
	     {
	      SendClientMessage(i, col4, string);
	     }
	     else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
	     {
	      SendClientMessage(i, col5, string);
	     }
	     }
	    }
	    else
	    {
	     SendClientMessage(i, col1, string);
	    }
	   }
	  }
	 }
 return true;
}

strtok(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }

    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

stock split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc)){
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return true;
}
stock SavePlayer(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid])
		{
			new string3[32];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "%s.ini", playername3);
			new File = iniOpen(string3);
			if(!File)
			{
			    iniSetInt(File,"Password",PlayerInfo[playerid][pPassword]);
                iniSetInt(File, "FMuted", PlayerInfo[playerid][pFMuted]);
                iniSetInt(File, "FMutedTime", PlayerInfo[playerid][pFMuted]);
                iniSetInt(File,"rules",PlayerInfo[playerid][pTuts]);
                iniSetInt(File,"Registr",PlayerInfo[playerid][pReg]);
                GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
				iniSetFloat(File,"Health",PlayerInfo[playerid][pHealth]);
				iniSetFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
				iniSetFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
				iniGetInt(File,"Deaths", PlayerInfo[playerid][pDeaths]);
                iniGetInt(File,"Kills", PlayerInfo[playerid][pKills]);
				iniGetInt(File,"Int",PlayerInfo[playerid][pInt]);
			    iniSetFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
                iniSetInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
                iniGetInt(File,"Banned",PlayerInfo[playerid][pBanned]);
                iniGetInt(File,"Locked",PlayerInfo[playerid][pLocked]);
                ini_closeFile(File);
                if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
			    {
					PlayerInfo[playerid][pPos_x] = 1937;
					PlayerInfo[playerid][pPos_y] = -1386.87;
					PlayerInfo[playerid][pPos_z] = 16.6575;
			    }
                if(Spectate[playerid] != 255)
				{
					PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
					PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
					PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
					PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
				}
				iniSetInt(File,"Banned",PlayerInfo[playerid][pBanned]);
				iniSetInt(File,"Locked",PlayerInfo[playerid][pLocked]);
			}
		}
	}
	return true;
}

stock OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
	{
		new string3[32];
		new playername3[MAX_PLAYER_NAME];
		GetPlayerName(playerid, playername3, sizeof(playername3));
		format(string3, sizeof(string3), "%s.ini", playername3);
		new File = iniOpen(string3);
		if(!File)
		{
            iniSet(File,"password",MD5_Hash(password));
            iniSetInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
            iniSetInt(File,"FMuted",PlayerInfo[playerid][pFMuted]);
            iniSetInt(File,"BanTime",PlayerInfo[playerid][pBanTime]);
			iniSetInt(File,"BanData",PlayerInfo[playerid][pBanData]);
            iniSetInt(File,"FMutedtime",PlayerInfo[playerid][pFMuted]);
            iniSetInt(File,"Registr",1);
            GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
			iniSetFloat(File,"Health",PlayerInfo[playerid][pHealth]);
			iniSetFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
			iniSetInt(File,"Deaths", PlayerInfo[playerid][pDeaths]);
            iniSetInt(File,"Kills", PlayerInfo[playerid][pKills]);
			iniSetFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
			iniSetFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
            iniSetInt(File,"rules",PlayerInfo[playerid][pTuts]);
            iniGetInt(File,"Int",PlayerInfo[playerid][pInt]);
            ini_closeFile(File);
            if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
			{
				PlayerInfo[playerid][pPos_x] = 1684.9;
				PlayerInfo[playerid][pPos_y] = -2244.5;
				PlayerInfo[playerid][pPos_z] = 13.5;
            }
			if(Spectate[playerid] != 255)
			{
				PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
				PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
				PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
				PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
			}
			iniSetInt(File,"Banned",PlayerInfo[playerid][pBanned]);
			iniSetInt(File,"Locked",PlayerInfo[playerid][pLocked]);
			gPlayerLogged[playerid] = 1;
			SpawnPlayer(playerid);
			SetPlayerSkin(playerid,random(299));
        }
    }
    return true;
}
public OnPlayerLogin(playerid,password[])
{
	new pass[64];
	new tmp2[128];
	new string[256];
	new playername2[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername2, sizeof(playername2));
	format(string, sizeof(string), "%s.ini", playername2);
	new File = iniOpen(string);
	if(!File)
	{
        iniGet(File,"password",pass);
        iniGetInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
        iniGetInt(File,"rules",PlayerInfo[playerid][pTuts]);
        iniSetInt(File,"FMutedTime",PlayerInfo[playerid][pFMutedTime]);
        iniSetInt(File,"FMuted",PlayerInfo[playerid][pFMuted]);
        iniSetInt(File,"BanTime",PlayerInfo[playerid][pBanTime]);
		iniSetInt(File,"BanData",PlayerInfo[playerid][pBanData]);
        iniGetInt(File,"Deaths", PlayerInfo[playerid][pDeaths]);
        iniGetInt(File,"Kills", PlayerInfo[playerid][pKills]);
        iniSetInt(File,"Registr",PlayerInfo[playerid][pReg]);
        iniGetFloat(File,"Health",PlayerInfo[playerid][pHealth]);
        iniGetFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
        iniSetFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
	    iniSetFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
        iniGetInt(File,"Banned",PlayerInfo[playerid][pBanned]);
        iniGetInt(File,"Locked",PlayerInfo[playerid][pLocked]);
        ini_closeFile(File);
    }
   	gPlayerLogged[playerid] = true;
	if(PlayerInfo[playerid][pReg] == 0)
	{
        PlayerInfo[playerid][pHealth] = 100.0;
        PlayerInfo[playerid][pPos_x] = 1761.0178;
        PlayerInfo[playerid][pPos_y] = -1900.2581;
        PlayerInfo[playerid][pPos_z] = 13.5637;
        PlayerInfo[playerid][pInt] = 0;
	}
 	//SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
  	format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~b~   %s", playername2);
	GameTextForPlayer(playerid, tmp2, 5000, 1);
	SpawnPlayer(playerid);
 	if(PlayerInfo[playerid][pAdmin] > 0)
  	{
   	new arank[64];
    switch(PlayerInfo[playerid][pAdmin])
    {
	    case 5: arank = "{c4f0c9}[5]{FF0000} Гл.Администратор{FFFFFF}";
	    case 4: arank = "{c4f0c9}[4]{FF0000} Зам. Гл. Администратора{FFFFFF}";
	    case 3: arank = "{c4f0c9}[3]{FFFF00} Ст. Модератор{FFFFFF}";
	    case 2: arank = "{c4f0c9}[2]{FFFF00} Модератор{FFFFFF}";
	    case 1: arank = "{c4f0c9}[1]{FFFFFF} Хелпер";
	    default: arank = "Модератор";
    }
	   	format(string, sizeof(string), "%s %s{FFFF00}, зашёл(а) на сервер.",arank, getpl(playerid));
	   	SendAdminMessage(COLOR_YELLOW, string);
    }
    return true;
}
public GameModeExitFunc()
{
    KillTimer(untimer);
    GameModeExit();
}
forward HelpINGame();
public HelpINGame()
{
    new randomHelp = random(sizeof(randMsg));
    SendClientMessageToAll(0x00C714AA, randMsg[randomHelp]);
    return (true);
}
public OnDance(playerid)
{
}

public OffDance()
{
}
stock DollahScoreUpdate()
{
	new LevScore;
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			LevScore = PlayerInfo[i][pKills];
			SetPlayerScore(i, LevScore);
		}
	}
	return true;
}
public OnPlayerUpdateRL(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid] == 1)
		{
			new string3[512];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "%s.ini", playername3);
			new File = ini_openFile(string3);
			if(!File)
			{
                iniSetInt(File,"Admin", PlayerInfo[playerid][pAdmin]);
                iniSetInt(File,"rules",PlayerInfo[playerid][pTuts]);
                iniSetInt(File, "BanTime",PlayerInfo[playerid][pBanTime]);
				iniSetInt(File, "BanData",PlayerInfo[playerid][pBanData]);
                iniSetInt(File,"Registr",1);
                GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
				iniSetFloat(File,"Health",PlayerInfo[playerid][pHealth]);
				iniSetFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
				iniSetFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
			    iniSetFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
                iniClose(File);
                if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
				{
					PlayerInfo[playerid][pPos_x] = 1684.9;
					PlayerInfo[playerid][pPos_y] = -2244.5;
					PlayerInfo[playerid][pPos_z] = 13.5;
				}
				if(Spectate[playerid] != 255)
				{
					PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
					PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
					PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
					PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
				}
				iniSetInt(File,"Banned",PlayerInfo[playerid][pBanned]);
				iniSetInt(File,"Locked",PlayerInfo[playerid][pLocked]);
			}
		}
	}
	return true;
}
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
	if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return true;
		}
	}
	return 0;
}
stock CloseEngine(carid)
{
    if(GetVehicleModel(carid) == 417 || GetVehicleModel(carid) == 425 || GetVehicleModel(carid) == 430
    || GetVehicleModel(carid) == 435 || GetVehicleModel(carid) == 441 || GetVehicleModel(carid) == 446
    || GetVehicleModel(carid) == 447 || GetVehicleModel(carid) == 449 || GetVehicleModel(carid) == 450
    || GetVehicleModel(carid) == 432 || GetVehicleModel(carid) == 452 || GetVehicleModel(carid) == 453
    || GetVehicleModel(carid) == 454 || GetVehicleModel(carid) == 460 || GetVehicleModel(carid) == 464
    || GetVehicleModel(carid) == 465 || GetVehicleModel(carid) == 469 || GetVehicleModel(carid) == 472
    || GetVehicleModel(carid) == 473 || GetVehicleModel(carid) == 476 || GetVehicleModel(carid) == 481
    || GetVehicleModel(carid) == 484 || GetVehicleModel(carid) == 487 || GetVehicleModel(carid) == 488
    || GetVehicleModel(carid) == 493 || GetVehicleModel(carid) == 497 || GetVehicleModel(carid) == 501
    || GetVehicleModel(carid) == 509 || GetVehicleModel(carid) == 510 || GetVehicleModel(carid) == 511
    || GetVehicleModel(carid) == 512 || GetVehicleModel(carid) == 513 || GetVehicleModel(carid) == 519
    || GetVehicleModel(carid) == 520 || GetVehicleModel(carid) == 537 || GetVehicleModel(carid) == 538
    || GetVehicleModel(carid) == 539 || GetVehicleModel(carid) == 548 || GetVehicleModel(carid) == 553
    || GetVehicleModel(carid) == 563 || GetVehicleModel(carid) == 564 || GetVehicleModel(carid) == 569
    || GetVehicleModel(carid) == 570 || GetVehicleModel(carid) == 577 || GetVehicleModel(carid) == 584
    || GetVehicleModel(carid) == 590 || GetVehicleModel(carid) == 591 || GetVehicleModel(carid) == 592
    || GetVehicleModel(carid) == 593 || GetVehicleModel(carid) == 594 || GetVehicleModel(carid) == 595
    || GetVehicleModel(carid) == 606 || GetVehicleModel(carid) == 607 || GetVehicleModel(carid) == 608
    || GetVehicleModel(carid) == 610 || GetVehicleModel(carid) == 611)
    {
       return true;
    }
    return 0;
}
public SaveAccounts1()
{
    new playerid;
    SavePlayer(playerid);
    OnPlayerUpdateRL(playerid);
}
stock SendAdminMessage(color, string[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(IsPlayerConnected(i))
		{
			if(PlayerInfo[i][pAdmin] >= 1)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
}
stock SendMessageToAll(color, string[])
{
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(IsPlayerConnected(i))
		{
			SendClientMessage(i, color, string);
		}
	}
}
stock GetPlayerID(namex[])// узнает ид игрока по нику
{
	new asd = 999;
	for(new i =0;i<MAX_PLAYERS;i++)
	{
		if(!strcmp(Name(i),namex,true) && IsPlayerConnected(i))
		{
			asd = i; break;
		}
	}
	if(asd != 999) return asd;
	else return -1;
}
stock getpl(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	return name;
}
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;
}
stock ObjectLoad()
{
	//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);
	//DM 3oHa [AS LV]
	return true;
}
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;
}
public Gmtest(playerid)
{
    new string[128], Float:nowhealth[MAX_PLAYERS];
    if(AdmGM[playerid] == 1)
    {
        GetPlayerHealth(AdmGMID[playerid],nowhealth[AdmGMID[playerid]]);
    }
    if((AdmGMHP[playerid]-nowhealth[AdmGMID[playerid]]) > 0)
    {
        format(string, sizeof(string), "До проверки: \t\t\t\t%.0f.0 HP\nПосле проверки: \t\t\t%.0f.0 HP\nHP уменьшилось на: \t\t%.0f.0\n\n{7FB151}GM не обнаружено.",AdmGMHP[playerid],nowhealth[AdmGMID[playerid]],(AdmGMHP[playerid]-nowhealth[AdmGMID[playerid]]));
        ShowPlayerDialog(playerid,8888,DIALOG_STYLE_MSGBOX, "Проверка на GM",string, "Закрыть", "");
        SetPlayerHealth(AdmGMID[playerid], AdmGMHP[playerid]);
        AdmGM[playerid] = 0;
        AdmGMHP[playerid] = 0;
        AdmGMID[playerid] = INVALID_PLAYER_ID;
     }
     else if((AdmGMHP[playerid]-nowhealth[AdmGMID[playerid]]) == 0)
     {
        format(string, sizeof(string), "До проверки: \t\t\t%.0f.0 HP\nПосле проверки: \t\t%.0f.0 HP\nHP не уменьшилось\n\n{CD5A5A}Есть подозрение что игрок использует GM.",AdmGMHP[playerid],nowhealth[AdmGMID[playerid]]);
        ShowPlayerDialog(playerid,8888,DIALOG_STYLE_MSGBOX, "Проверка на GM",string, "Закрыть", "");
        AdmGM[playerid] = 0;
        AdmGMHP[playerid] = 0;
        AdmGMID[playerid] = INVALID_PLAYER_ID;
    }
    KillTimer(GmtestTimer[playerid]);
}
forward SetPlayerUnjail();
public SetPlayerUnjail()
{
   new i;
   if(PlayerInfo[i][pFMutedTime] !=0 || PlayerInfo[i][pFMutedTime] !=0)
        {
            PlayerInfo[i][pFMutedTime] --;
            PlayerInfo[i][pFMutedTime] --;
            if(PlayerInfo[i][pFMutedTime] == 0 || PlayerInfo[i][pFMutedTime] == 0)
            {
                PlayerInfo[i][pFMuted] = 0;
                PlayerInfo[i][pFMuted] = 0;
            }
        }
  return 1;
}
forward FMutePlayer(playerid);
public FMutePlayer(playerid)
{
    if(PlayerInfo[playerid][pFMuted] == 1)
    {
    new string[144];//stringmark
    format(string,sizeof(string), "....{E3BE88} %d{ffffff} ...", PlayerInfo[playerid][pFMutedTime]);
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
    }
    return 1;
}
stock GetBan(playerid)
{
    new PlayerNick[MAX_PLAYER_NAME],string[255];
    GetPlayerName(playerid, PlayerNick, MAX_PLAYER_NAME);
    format(string, sizeof(string), "banlist/%s.ini", PlayerNick);
    if(fexist(string))
    {

           new OpenBan = ini_openFile(string);
           new bantime, unbantime, PlayerBan[MAX_PLAYER_NAME], reason[128];
           ini_getInteger(OpenBan, "BanTime", bantime);
           ini_getInteger(OpenBan, "UnBanTime", unbantime);
           ini_getString(OpenBan, "PlayerBan", PlayerBan);
           ini_getString(OpenBan, "Reason", reason);
           ini_closeFile(OpenBan);
           if(gettime() >= unbantime) return UnBan(PlayerNick);
           else
           {
                 format(string, sizeof(string), "Забанил:%s Причина:%s",
                 PlayerBan,reason);
                 ShowPlayerDialog(playerid,DIALOGUNBAN,0,"BANNED",string,"Закрыть","");
                 return Kick(playerid);
           }
    }
    else return true;
}

stock UnBan(playerid[])
{
    new string[64];
    format(string, sizeof(string), "banlist/%s.ini", playerid);
    return fremove(string);
}

stock AddBan(player, playerid[], giveplayerid[], type = 1, chislo = 0, reason[])
{
    new totalban = 0;
    switch(type)
    {
         case 1: totalban = 60*chislo;
         case 2: totalban = 3600*chislo;
         case 3: totalban = 86400*chislo;
         default: totalban = chislo;
    }
    new string[64];
    format(string, sizeof(string), "banlist/%s.ini", playerid);
    new OpenBan = ini_createFile(string);
    if(OpenBan < 0) ini_openFile(string);
    ini_setInteger(OpenBan, "BanTime", gettime());
    ini_setInteger(OpenBan, "UnBanTime", gettime()+totalban);
    ini_setString(OpenBan, "PlayerBan", giveplayerid);
    ini_setString(OpenBan, "Reason", reason);
    ini_closeFile(OpenBan); 
    Kick(player);
    ShowPlayerDialog(player,DIALOGUNBAN,0,".","{FF0000}...","...","");
    return Kick(player);
}
public King(playerid)
{
    if (krematory[playerid] > 0) krematory[playerid]--;
    return 1;
}stock NotFlyingHack(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 20.0, 1968.3948,-1198.0753,17.4500)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 2310.9861,-1412.8881,21.6151)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 1241.1094,-2379.7263,8.3145)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 225.6394,-1187.0551,73.4500)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 193.2040,-1224.7693,76.5034)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 196.0067,-1232.3684,76.5034)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 512.7349,-1104.1942,78.8238)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 1283.7939,-806.5845,86.1230)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 20.0, 2531.6001,1568.4032,8.4171)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 60.0, 2105.2651,1916.6781,9.5989)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 150.0, -792.4582,2173.0356,40.0821)) return true;
    else if(IsPlayerInRangeOfPoint(playerid, 150.0, 1993.5868,1601.2623,9.2979)) return true;
    return false;
}
stock PlayerSpeed(playerid)
{
    new Float:X, Float:Y, Float:Z;
    if(!IsPlayerInAnyVehicle(playerid)) GetPlayerVelocity(playerid,X,Y,Z);
    return floatround( floatsqroot( X * X + Y * Y + Z * Z ) * 170.0 );
}
forward NoRoof(playerid);
public NoRoof(playerid)
{
    new carid = GetPlayerSurfingVehicleID(playerid);
    if(carid != INVALID_VEHICLE_ID )
    {
        new cm=GetVehicleModel(carid);
        switch(cm)
        {
        case 430,446,452,453,454,472,473,484,493,595:{return true;}
        default:{}
        }
        new Float:slx, Float:sly, Float:slz;
        GetPlayerPos(playerid, slx, sly, slz);
        SetPlayerPos(playerid, slx, sly, slz+2.5);
    }
    return true;
}
stock IsAAntidm(playerid)
{
	if(IsPlayerInRangeOfPoint(playerid, 30.0, 1937.0369,-1386.8706,16.6505))
	{
		return true;
	}
	return false;
}
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;
}
public SpecHArefresh(playerid, specplayerid)
{
        new SM_HAstring[256];
        new Float:armour, Float:health;
        new ping = GetPlayerPing(specplayerid);
        new giveplayer[MAX_PLAYER_NAME];
        GetPlayerHealth(specplayerid, health);
        GetPlayerArmour(specplayerid, armour);
        GetPlayerName(specplayerid, giveplayer, sizeof(giveplayer));
        format(SM_HAstring,sizeof(SM_HAstring),"Name: ~w~%s[%d]~n~~r~Health: %.0f ~n~~w~Armour: %.0f~n~~b~Ping: %d",giveplayer, specplayerid, health, armour, ping);
        TextDrawSetString(SM_HA[playerid], SM_HAstring);
        return 1;
}
/*public SavePlayerPos()
{
	new Float:x,Float:y,Float:z;
	for(new i = 0;i , MAX_PLAYERS;i++)
	{
		GetPlayerPos(i,px,py,pz);//Получаем позицию игрока
		PlayerInfo[i][pPos_x] = px;//записываем x
		PlayerInfo[i][pPos_y] = py;//записываем y
		PlayerInfo[i][pPos_z] = pz;//записываем z
	}
}*/
