GitHub repository: qweasdzxc1/Stepan69
Description: #include <a_samp> #include <a_mysql> #include <mxINI> #include <crashdetect> #include <utils> //#include <streamer> #pragma tabsize 0 //============================[Information]===================================// #define VersionMode "v4.7"                                                    // Âåðñèÿ ìîäà #define Server_Name "Revoluton RP"                                            // Íàçâàíèå Ñåðâåðà #define SITE_HTTP   "vk.com/new_Revoluton_game"                               // Íàçâàíèÿ ãðóïïû #define By          "Stepan_Efimov & Semyon Bondarev"                         // Ðàçðàáîò÷èêè //===============================[MySQL äàííûå]===============================// #define SQL_HOST    "mc3.baims.ru" #define SQL_USER    "gta_4373" #define SQL_DB      "gta_4373" #define SQL_PASS    "4G2u83uYtq" //=============================[Öâåòà â ñòèëå Delphi]=========================// #define clWhite		0xFEFEFEFF                                                // Áåëûé #define clGrad      0xB4B5B7FF                                                // Ñåðûé #define clBlue		0x3399FF                                                  // Ñèíèé #define clLightBlue	0x8888FFFF                                                // Ñâåòëî-ñèíèé #define clDarkRed	0xDD4400FF                                                // Òåìíî-êðàñíûé #define clLightRed	0xFF8800FF                                                // Ñâåòëî-êðàñíûé #define clRed	    0xFF0000AA                                                // Êðàñíûé #define clYellow	0xFFFF00FF                                                // Æåëòûé #define clOrange	0xFFA500FF                                                // Îðàíæåâûé #define clGrey		0xCFCFCFFF                                                // Ñåðûé #define clGreen		0x22AA44FF                                                // Çåëåíûé #define clLime		0x88DD00FF                                                // Ëàéìîâûé #define clBlack		0x000000FF                                                // ×åðíûé #define clPurple	0xC2A2DAAA                                                // Ïóðïóðíûé //==============================[Íàñòðîéêè]===================================// #define long_line	           500                                            // Ìàêñèìàëüíàÿ äëèíà ñòðîêîâîé êîíñòàíòû #define short_line             60                                             // Ìàêñèìàëüíàÿ äëèíà ñòðîêîâîé êîíñòàíòû #define	small_line	           25                                             // Ìàêñèìàëüíàÿ äëèíà ñòðîêîâîé êîíñòàíòû #define dialog_line	           2000                                           // Ìàêñèìàëüíàÿ äëèíà ñòðîêîâîé êîíñòàíòû(Äèàëîãè) #define max_tps                100                                            // Ìàêñèìàëüíîå êîëè÷åñòâî òåëåïîðòîâ #define max_name               24                                             // Ìàêñèìàëüíàÿ äëèíà èìåíè #define max_line               200                                            // Ìàêñèìàëüíàÿ äëèíà ñòðîêîâîé êîíñòàíòû #define max_houses		       300                                            // Ìàêñèìàëüíîå êîëè÷åñòâî äîìîâ #define max_biznes		       300                                            // Ìàêñèìàëüíîå êîëè÷åñòâî áèçíåñîâ #define max_factions           13                                             // Ìàêñèìàëüíàÿ êîëè÷åñòâî ôðàêöèé #define distance_close         2.0 #define distance_normal	       20.0                                           // Ëîêàëüíûé ÷àò. #define invnumbers             11                                             // Èíâåíòàðü, äåôàéí äëÿ ìàññèâîâ ñ íàçâàíèÿìè è îáúåêòàìè #define max_obj                10000                                          // Ìàêñèìàëüíî êîëâî îáúåêòîâ ëóòà //==============================[Ðåãèñòðàöèÿ]=================================// #define dialog_loot            0 #define dialog_login           1 #define dialog_register        2 #define dialog_alogin          3 #define dialog_aregister       4 #define dialog_invite          5 //==============================[Êàòåãîðèè ÒÑ]================================// #define Cat0	               0	                                          // Âåëîñèïåäû #define CatA	               1                                              // Ìîòîöèêëû, êâàäðîöèêë #define CatB	               2                                              // Ëåãêîâûå, äæèïû, ìèêðîàâòîáóñû #define CatC	               3                                              // Ãðóçîâèêè, àâòîáóñû #define CatD	               4                                              // Âåñü âîäíûé òðàíñïîðò #define CatE	               5                                              // Âåðòîëåòû #define CatF	               6                                              // Ñàìîëåòû #define CatG	               7                                              // Ïîåçäà //==============================[main]========================================// main(){ print("--------------------------------"); print(" by:      "By"                  "); print(" Version: "VersionMode"         "); print(" Name:    "Server_Name"         "); print(" HTTP:    "SITE_HTTP"           "); print("--------------------------------");} //============================[Óïðàù¸ííûé âèä]================================// #define restricted(%1); \ if(AdminInfo[playerid][aAdmin]<%1){ \ Message(playerid,"Ó âàñ íåòó ïðàâ äëÿ èñïîëüçîâàíèÿ ýòîé êîìàíäû!",clLightRed); \ return 1;} //-- GetInt #define getInt(%2); \ tmp = strtok(cmdtext,idx); \ if(!strlen(tmp)) { \ Message(playerid,%2,clWhite); \ return 1;} \ pint = strval(tmp); //-- GetStr #define getStr(%2); \ tmp = strtok(cmdtext,idx); \ if(!strlen(tmp)){ \ Message(playerid,%2,clWhite); \ return 1;} //-- GetTgt #define getTgt(%2); \ tmp = strtok(cmdtext,idx); \ if(!strlen(tmp)){ \ Message(playerid,%2,clWhite); \ return 1;} \ tgt = ReturnUser(tmp);\ checkplayer(tgt); //-- ÑheckPlayer #define checkplayer(%1); \ if(!IsPlayerConnected(%1)){\ Message(playerid,"Íåò òàêîãî èãðîêà.",clDarkRed);\ return 1;} //-- CheckDistance #define checkdistance(%1,%2,%3); \ if(GetDistancePP(%1,%2)>%3){ \ format(msg,max_line,"%s ñëèøêîì äàëåêî îò âàñ",GetName(%2));\ Message(%1,msg,clDarkRed);\ return 1;} //==============================forward=======================================// forward GivePlayerCash(playerid,amount); forward UnGivePlayerCash(playerid,cash); forward HideCash(); forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); forward Unfreze(playerid); forward OnPlayerDataLoaded(playerid, race_check); forward OnPlayerRegister(playerid); forward OnAdminRegister(playerid); forward OnAdminDataLoaded(playerid); forward HUDTimerUpdate(playerid); forward SaveAccount(playerid); forward KickPlayer(playerid); forward BanPlayer(playerid); forward tpLoad(); forward OnTeleportCreate(f); forward OnHouseCreate(f); forward OnBiznesCreate(f); forward OnVehicleCreate(f); forward LoadProp(); forward LoadBiz(); forward LoadVehicles(); forward LoadObjects(); forward gClose(id); //==============================pInfo=========================================// enum pInfo { pID, pPassword[129], pKills, pDeaths, pMoney, pBank, pFaction, pRank, pSkin, Float:pPosX, Float:pPosY, Float:pPosZ, Float:pPosA, Float:pHealth, pBanned, }; //==============================hInfo=========================================// enum hInfo{ hPickupID,// Íå ñîõðàíÿåòñÿ hID, hPrice, hIcon, hIntr, hOpen, Float: hPosX, Float: hPosY, Float: hPosZ, Float: hPosR, Float: hEPosX, Float: hEPosY, Float: hEPosZ, Float: hEPosR, }; //==============================aAdmin========================================// enum aInfo{ aID, aPassword[129], aAdmin, aBans, aKicks, }; //==============================tInfo=========================================// enum tInfo{ tpPickupid,// Íå ñîõðàíÿåòñÿ tpID, tpIntr, tpFaction, Float: tpSPos[3], Float: tpDPos[4], }; //=============================bInfo==========================================// enum bInfo{ bPickupID,// Íå ñîõðàíÿåòñÿ bID, bOpen, bIntr, bPrice, Float:bSPos[4], Float:bDPos[4], } //============================vInfo===========================================// enum vInfo{ vPickupID,// Íå ñîõðàíÿåòñÿ vID, vModel, vColor1, vColor2, Float:vHealth, Float:vPos[4], } //==============================Äàííûå ïðåäìåòîâ ëóòà=========================// enum dInvEnum{ Float:ItemPos[3], ItemObjID, ItemID}; //==============================Ïåðåìåííûå====================================// new PlayerInv[max_players][invnumbers];                                       // Òóò Õðàíèì èäû ïðåäìåòîâ èíâåíòàðÿ new dInvData[max_obj][dInvEnum];                                              // Ïåðåìåííàÿ îïðåäåëÿþùàÿ èä ëóòà è åãî ïîçèöèþ new AdminInfo[max_players][aInfo];                                            // Ìàññèâ Àäìèíèñòðàòîðà new PlayerInfo[max_players][pInfo];                                           // Ìàññèâ Èãðîêà new LicenseInfo[max_players][8];                                              // Ëèöåíçèè new HouseInfo[max_houses][hInfo];                                             // Ìàññèâ äîìà new BiznesInfo[max_biznes][bInfo];                                            // Ìàññèâ áèçíåñà new TeleportInfo[max_tps][tInfo];                                             // Ìàññèâ òåëåïîðòîâ new VehicleInfo[max_vehicles][vInfo];                                         // Ìàññèâ ìàøèí new ReportDelay[max_players];                                                 // Ñåêóíäû äî íîâîãî ðåïîðòà new LastSecond[max_players]; new Perevod[max_players]; new MysqlRaceCheck[max_players]; new LoginAttempts[max_players]; new TimerHideCash[max_players];                                               // Òàéìåð äî ñêðûòèÿ - äåíåã new hOwner[max_houses][max_name]; new PropIcon[max_houses][max_players]; new Flasher[max_players];                                                     // Ìèãàëêà new FlasherObj[max_vehicles];                                                 // Ìèãàëêà (îáúåêò) new GivePlayerAdmin[max_players] = 0; new bOwner[max_biznes][max_name]; new SpectateType[max_players]; new AdminSpecID[max_players]; new bool:Logged[max_players]; //-- Texts new Text: TextDrawCash[max_players]; //-- new SQL = -1; new Report = 1; new Kazna = 0; //----------------------------------------------------------------------------// new CatName[][] = {"0","A","B","C","D","E","F","G"}; // --------------Èíâåíòàðü----------------------------------------------------// new InvNames[invnumbers][]={ "Íè÷åãî", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà", "Ìèãàëêà"}; // ---------------------------------------------------------------------------// new InvObjects[invnumbers] = { 0,18646,18646,18646,18646,18646,18646,18646,18646,18646,18646}; //----------------------------------------------------------------------------// new CarName[][] ={ "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune", "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent", "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium", "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club", "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car", "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville", "Tiller", "Utility Trailer", "foot"}; // ---------------------------------------------------------------------------// new Text:TextDrawInvFon; new Text:TextDrawInvMenu; new Text:TextDrawInvPocket; new Text:TextDrawInvPack; new Text:TextDrawInvCar; new Text:TextDrawInvShop; new PlayerText:Graphinv9[max_players][12]; new PlayerText:TextDrawInvSkin[max_players]; new PlayerText:TextDrawInvItems[max_players]; new PlayerText:TextDrawInvItems2[max_players]; new PlayerText:TextDrawInvItems3[max_players]; new PlayerText:TextDrawInvItems4[max_players]; new PlayerText:TextDrawInvItems5[max_players]; new PlayerText:TextDrawInvItems6[max_players]; new PlayerText:TextDrawInvItems7[max_players]; new PlayerText:TextDrawInvItems8[max_players];  new PlayerText:Graphinv[max_players]; new PlayerText:TextDrawInvLicenses[max_players]; new PlayerText:TextDrawInvFraction[max_players]; // ---------------------------------------------------------------------------// new GraphItemList[11][max_players];//Ïåðåìåííàÿ äëÿ õðàíåíèÿ èäîâ èíâåíòàðÿ â ÿ÷åéêå òåêñòäðàâà new SelectItem[max_players];//Ïåðåìåííàÿ äëÿ õðàíåíèÿ èäîâ èíâåíòàðÿ ïðè êëèêå // ---------------------------------------------------------------------------// new FactionNames[max_factions][]={ "Ãðàæäàíñêèé",         // 0 "Ïîëèöèÿ Los Santos",  // 1 "Ïîëèöèÿ San Fiero",   // 2 "Ïîëèöèÿ Las Venturas",// 3 "FBI",                 // 4 "Ïðàâèòåëüñòâî",       // 5 "Ïîëèöåéñêàÿ àêàäåìèÿ",// 6 "Àðìèÿ SF",            // 7 "Àðìèÿ LV",            // 8 "Ëèöåíçåðû",           // 9 "Ìåäèêè LS",           // 10 "Ìåäèêè LV",           // 11 "Ìåäèêè SF"            // 12 }; // ---------------------------------------------------------------------------// new MaxFactionRank[max_factions]={ 0,  // Ãðàæäàíñêèå          [0] 9,  // Ïîëèöèÿ LS           [1] 9,  // Ïîëèöèÿ SF           [2] 9,  // Ïîëèöèÿ LV           [3] 7,  // ÔÁÐ                  [4] 4,  // Ïðàâèòåëüñòâî        [5] 2,  // Ïîëèöåéñêàÿ àêàäåìèÿ [6] 13, // Àðìèÿ ÑÔ             [7] 13, // Àðìèÿ ËÂ             [8] 5,  // Ìåäèêè LS            [9] 5,  // Ìåäèêè LV            [10] 5,  // Ìåäèêè SF            [11] }; // ---------------------------------------------------------------------------// new FactionRangNames[max_factions][15][128]={ {"Íåò","","","","","","","","","","","","","",""},// Ãðàæäàíñêèå {"Íåò","Îôèöåð","Äåòåêòèâ","Ñåðæàíò","Ëåéòåíàíò","Êàïèòàí","Èíñïåêòîð","Øåô ïîëèöèè","Ïîìîøíèê êîìèññàðà","Êîìèññàð","","","","",""},// Ïîëèöèÿ LS {"Íåò","Îôèöåð","Äåòåêòèâ","Ñåðæàíò","Ëåéòåíàíò","Êàïèòàí","Èíñïåêòîð","Øåô ïîëèöèè","Ïîìîøíèê êîìèññàðà","Êîìèññàð","","","","",""},// Ïîëèöèÿ SF {"Íåò","Îôèöåð","Äåòåêòèâ","Ñåðæàíò","Ëåéòåíàíò","Êàïèòàí","Èíñïåêòîð","Øåô ïîëèöèè","Ïîìîøíèê êîìèññàðà","Êîìèññàð","","","","",""},// Ïîëèöèÿ LV {"Íåò","Ñòàæåð","Àãåíò","Ñòàðøèé àãåíò","Ñïåöèàëüíûé àãåíò","Èíñïåêòîð","Çàì. Äèðåêòîðà","Äèðåêòîð FBI","","","","","","",""},// FBI {"Íåò","Ìýð ËÑ","Ìýð ËÂ","Ìýð ÑÔ","Ãóáåðíàòîð","","","","","","","","","",""},                                                                                              // Ïðàâèòåëüñòâî {"Íåò","Îôèöåð","Çàì. ÊÊ","","","","","","","","","","","",""}, // Ïîëèöåéñêàÿ àêàäåìèÿ {"Íåò","Ðÿäîâîé","Êàïðàë","Ñåðæàíò","Øòàï-ñåðæàíò","Ìàñòåð ñåðæàíò","Ñåðæàíò ìàéîð","Ëåéòåíàíò","Êàïèòàí","Ìàéîð","Ïîäïîëêîâíèê","Ïîëêîâíèê","Ãåíåðàë","Ãåíåðàë àðìèè",""}, // Àðìèÿ ÑÔ {"Íåò","Ðÿäîâîé","Êàïðàë","Ñåðæàíò","Øòàï-ñåðæàíò","Ìàñòåð ñåðæàíò","Ñåðæàíò ìàéîð","Ëåéòåíàíò","Êàïèòàí","Ìàéîð","Ïîäïîëêîâíèê","Ïîëêîâíèê","Ãåíåðàë","Ãåíåðàë àðìèè",""}, // Àðìèÿ ËÂ {"Íåò","Ñàíèòàð","","","","","","","","","","","","",""}, // Ìåäèêè LS {"Íåò","Ñàíèòàð","","","","","","","","","","","","",""}, // Ìåäèêè LV {"Íåò","Ñàíèòàð","","","","","","","","","","","","",""}, // Ìåäèêè SF {"Íåò","","","","","","","","","","","","","",""}};               // íåòó //==============================OnGameModeInit================================// public OnGameModeInit(){ new query[128]; //-- Connect mysql --// mysql_log(LOG_ERROR | LOG_WARNING, LOG_TYPE_TEXT); SQL = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS); //-- mysql_format(SQL, query, sizeof(query), "SELECT * FROM `Teleports` WHERE `ID`"); mysql_tquery(SQL, query, "tpLoad","",""); //-- mysql_format(SQL, query, sizeof(query), "SELECT * FROM `Props` WHERE `ID`"); mysql_tquery(SQL, query, "LoadProp","",""); //-- mysql_format(SQL, query, sizeof(query), "SELECT * FROM `Biznes` WHERE `ID`"); mysql_tquery(SQL, query, "LoadBiz","",""); //-- mysql_format(SQL, query, sizeof(query), "SELECT * FROM `Vehicles` WHERE `ID`"); mysql_tquery(SQL, query, "LoadVehicles","",""); //-- Timers --// SetTimer("SaveAccount",50000,1); //-- Loading --//  //-- Íàñòðîéêè --// ShowNameTags(1); EnableStuntBonusForAll(0); DisableInteriorEnterExits(); SetNameTagDrawDistance(20.0); SetGameModeText("Revolution-Rp v3.0"); CreateInventoryTextDraw(); UsePlayerPedAnims(); AddPlayerClass(0,1958.33, 1343.12, 15.36, 269.15,0,0,0,0,0,0); //-- return 1;}// Êîíåö public OnGameModeInit //==============================OnGameModeExit================================// public OnGameModeExit(){ //==Inv TextDrawHideForAll(TextDrawInvFon); TextDrawDestroy(TextDrawInvFon); TextDrawHideForAll(TextDrawInvMenu); TextDrawDestroy(TextDrawInvMenu); TextDrawHideForAll(TextDrawInvPocket); TextDrawDestroy(TextDrawInvPocket); TextDrawHideForAll(TextDrawInvPack); TextDrawDestroy(TextDrawInvPack); TextDrawHideForAll(TextDrawInvCar); TextDrawDestroy(TextDrawInvCar); TextDrawHideForAll(TextDrawInvShop); TextDrawDestroy(TextDrawInvShop); mysql_close(); for(new i = 0; i < max_players; i++){ if(SpectateType[i] != 0) SpectateType[i] = 0; } return 1;}// Êîíåö public OnGameModeExit //========================OnPlayerRequestClass================================// public OnPlayerRequestClass(playerid, classid){  return 1;} //=============================OnPlayerConnect================================// public OnPlayerConnect(playerid){ //-- mysql --// MysqlRaceCheck[playerid]++; for(new pInfo:e; e < pInfo; ++e) PlayerInfo[playerid][e] = 0; new query[128]; mysql_format(SQL, query, sizeof(query), "SELECT * FROM `Users` WHERE `Name` = '%e' LIMIT 1", GetName(playerid)); mysql_tquery(SQL, query, "OnPlayerDataLoaded", "dd", playerid, MysqlRaceCheck[playerid]); //-- Íàñòðîéêè --// ShowPlayerTextDraw(playerid); //-- SetPlayerHealth(playerid, 100.0); CreateItemList(playerid); SetPlayerColor(playerid, clWhite); if(SpectateType[playerid] != 0) SpectateType[playerid] = 0; return 1;} //==========================OnPlayerDisconnect================================// public OnPlayerDisconnect(playerid, reason){ //-- Mysql --// MysqlRaceCheck[playerid]++; SaveAccount(playerid); //-- DestroyItemList(playerid); GivePlayerAdmin[playerid] = 0; LoginAttempts[playerid] = 0; if(SpectateType[playerid] != 0) SpectateType[playerid] = 0; //-- PlayerTextDrawHide(playerid,TextDrawInvFraction[playerid]); PlayerTextDrawDestroy(playerid,TextDrawInvFraction[playerid]); PlayerTextDrawHide(playerid,TextDrawInvLicenses[playerid]); PlayerTextDrawDestroy(playerid,TextDrawInvLicenses[playerid]); PlayerTextDrawHide(playerid, TextDrawInvSkin[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvSkin[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems2[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems2[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems3[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems3[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems4[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems4[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems5[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems5[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems6[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems6[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems7[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems7[playerid]); PlayerTextDrawHide(playerid, TextDrawInvItems8[playerid]); PlayerTextDrawDestroy(playerid, TextDrawInvItems8[playerid]); return 1;} //========================OnPlayerSpawn=======================================// public OnPlayerSpawn(playerid){ Logged[playerid] = true; SetIcons(playerid); if(SpectateType[playerid] != 0) SpectateStop(playerid); //-- Óñòàíîâêà ñêèíà  //-- if(PlayerInfo[playerid][pPosX] > 0.0 || PlayerInfo[playerid][pPosY] > 0.0){ SetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ] + 1); SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]); SetCameraBehindPlayer(playerid); //-- Óñòàíîâêà ñêèíà if(PlayerInfo[playerid][pFaction] < 0){ SetPlayerFactionColor(playerid,PlayerInfo[playerid][pFaction]); SetPlayerSkin(playerid, SetPlayerFaction(playerid,PlayerInfo[playerid][pFaction], PlayerInfo[playerid][pRank])); } else { SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerFactionColor(playerid,0);} //-- } else { SetPlayerHealth(playerid, 100); LastSecond[playerid] = -1; SpawnPlayer(playerid); return 1;} //-- return 1;}// The End public OnPlayerSpawn //========================OnPlayerDeath=======================================// public OnPlayerDeath(playerid, killerid, reason){ PlayerInfo[playerid][pDeaths] += 1; PlayerInfo[killerid][pKills] += 1; return 1;}  public OnVehicleSpawn(vehicleid){  return 1;}  public OnVehicleDeath(vehicleid, killerid) { 	return 1; }  public OnPlayerText(playerid, text[]) { 	return 1; } //==========================OnPlayerCommandText===============================// public OnPlayerCommandText(playerid, cmdtext[]){ if(!Logged[playerid]) return Message(playerid, "Çàðåãèñòðèðóéòåñü èëè âîéäèòå â èãðó!",clDarkRed); new idx = 0, pint, tgt, user[2]; new msg[max_line], cmd[max_line], tmp[max_line], name[max_line], ptext[max_line]; new Float: x, Float: y, Float: z,Float: a; GetPlayerName(playerid,name,max_line); printf("[command] [%i] %s: %s",playerid,GetName(playerid),cmdtext); format(tmp,max_line,"[%s, id: %i] %s",GetName(playerid),playerid,cmdtext); cmd = strtok(cmdtext,idx); strmid(ptext,cmdtext,idx,strlen(cmdtext)); //----------------------------------------------------------------------------// //----------------------------Àäìèí êîìàíäû-----------------------------------// //----------------------------------------------------------------------------// if(iscmd(cmd,"/alogin")){ new string[128]; if(!GivePlayerAdmin[playerid]) return 1; format(string, sizeof(string), "Ââåäèòå ïàðîëü\n\nÏàðîëü äîëæåí ñîñòîÿòü èç ëàòèíñêèõ áóêâ è öûôð\n            ðàçìåðîì îò 6 äî 15 ñèìâîëîâ.", GetName(playerid)); ShowPlayerDialog(playerid, dialog_aregister, DIALOG_STYLE_PASSWORD, "Àäìèí ðåãèñòðàöèÿ:", string, "Îê", "Îòìåíà"); return 1;} //-- Test cmds --// if(iscmd(cmd,"/giveadmin")){ GivePlayerAdmin[playerid] = 1; return 1;} //-- if(iscmd(cmd,"/give")){ GivePlayerCash(playerid,1000000); Kazna -= 1000000; SaveAccount(playerid); return 1;}  if(iscmd(cmd,"/giveinv")){ PlayerInv[playerid][1] += 1; return 1;}  if(iscmd(cmd,"/giveinvv")){ PlayerInv[playerid][2] += 1; return 1;}  if(iscmd(cmd,"/giveinv2")){ format(msg,max_line,"%d",PlayerInv[playerid][1]); Message(playerid,msg,clGreen); return 1;} //-- if(iscmd(cmd,"/giveban")){ PlayerInfo[tgt][pBanned] = 1; Kick(tgt); return 1;}  if(iscmd(cmd,"/testshow")){ for(new slot=0; slot<11; slot++){ PlayerTextDrawShow(playerid, Graphinv9[playerid][slot]);} return 1;}  if(iscmd(cmd,"/testmusic")){ GetPlayerPos(tgt,x,y,z); PlayerPlaySound(playerid, 1, x,y,z); return 1;}  if(iscmd(cmd,"/testd")){ PlayerTextDrawSetPreviewModel(playerid, Graphinv[playerid],18646); PlayerTextDrawShow(playerid, Graphinv[playerid]); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/i")){ ShowLootsDialog(playerid); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/makeadmin")){                                                  // Äàòü àäìèíèñòðàòîðñêèå ïîëíîìî÷èÿ getTgt("Èñïîëüçîâàíèå: /makeadmin {FF0000}[èãðîê] [óðîâåíü]"); getInt("Èñïîëüçîâàíèå: /makeadmin [èãðîê] {FF0000}[óðîâåíü]"); if(AdminInfo[tgt][aAdmin] < 1) return Message(playerid,"Ýòîò èãðîê íå àäìèíèñòðàòîð!",clDarkRed); AdminInfo[tgt][aAdmin] = pint; if(pint > 5) return Message(playerid,"Âû íå ìîæåòå äàòü áîëüøå 5 óðîâíÿ!",clDarkRed); if(pint == 0){ new query[128]; mysql_format(SQL, query, sizeof(query), "DELETE FROM `Admins` WHERE `Name` = '%s'", GetName(tgt)); mysql_tquery(SQL, query, "", ""); format(msg,max_line,"Èãðîê %s áîëüøå íå àäìèíèñòðàòîð.",GetName(tgt)); Message(tgt,"Âû áîëüøå íå àäìèíèñòðàòîð.",clDarkRed); Message(playerid,msg,clDarkRed); SaveAccount(tgt); return 1;} format(msg,max_line,"Àäìèíèñòðàòîð %s ïîâûñåë/ïîíèçåë %s íà äîëæíîñòü %s.",GetName(playerid), GetName(tgt),GetAdminName(tgt)); AMessage(msg,clLime); format(msg,max_line,"Bû áûëè ïîâûøåíû/ïîíèæåíû íà äîëæíîñòü %s.",GetAdminName(tgt)); Message(tgt,msg,clYellow); AdminInfo[tgt][aAdmin] = pint; SaveAccount(tgt); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/kick")){ restricted(1);                                        // Êèêíóòü óêàçàííîãî èãðîêà getTgt("Èñïîëüçîâàíèå: /kick {FF0000}[èãðîê] {ïðè÷èíà}"); strmid(tmp,cmdtext,idx,strlen(cmdtext)); if(playerid == tgt) return Message(playerid,"Íåëüçÿ èñïîëüçîâàòü äàííîå äåéñòâèå íà ñåáå!",clDarkRed); if(AdminInfo[playerid][aAdmin] < AdminInfo[tgt][aAdmin] || IsPlayerNPC(tgt) && AdminInfo[playerid][aAdmin] == 5){ Message(playerid,"Âû íå ìîæåòå êèêíóòü àäìèíèñòðàòîðà!",clDarkRed); format(msg,max_line,"Àäìèíèñòðàòîð %s õîòåë êèêíóòü àäìèíèñòðàòîðà %s.",GetName(playerid),GetName(tgt)); AMessage(msg,clLime); return 1;} KickBanPlayer(0, playerid, tgt, tmp); // Kick return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/ban")){ restricted(1);                                         // Çàáàíèòü èãðîêà getTgt("Èñïîëüçîâàíèå: /ban {FF0000}[èãðîê] {ïðè÷èíà}"); strmid(tmp,cmdtext,idx,strlen(cmdtext)); if(playerid == tgt) return Message(playerid,"Íåëüçÿ èñïîëüçîâàòü äàííîå äåéñòâèå íà ñåáå!",clDarkRed); if(AdminInfo[playerid][aAdmin] < AdminInfo[tgt][aAdmin] || IsPlayerNPC(tgt) && AdminInfo[playerid][aAdmin] == 5){ Message(playerid,"Âû íå ìîæåòå çàáàíèòü àäìèíèñòðàòîðà!",clDarkRed); format(msg,max_line,"Àäìèíèñòðàòîð %s õîòåë çàáàíèòü àäìèíèñòðàòîðà %s.",GetName(playerid),GetName(tgt)); AMessage(msg,clLime); return 1;} KickBanPlayer(1, playerid, tgt, tmp); // Ban return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/kickall")){ restricted(4);                                     // Êèêíóòü âñåõ èãðîêîâ ñ ñåðâåðà SendClientMessageToAll(clRed,"Âñå èãðîêè ñåðâåðà áûëè êèêíóòû ÷åðåç êîíñîëü."); for(new i=0; i<max_players; i++){ if(IsPlayerConnected(i) && AdminInfo[i][aAdmin] == 0){ Kick(i);}} print("You are kick all players from server."); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/cfg")){ restricted(5);                                         // Ïàðàìåòðû ñåðâåðà. tmp = strtok(cmdtext,idx); if(!strlen(tmp)){ Message(playerid,"Èñïîëüçîâàíèå: /cfg [ïàðàìåòð] {çíà÷åíèå}",clWhite); Message(playerid,"Äîñòóïíûå ïàðàìåòðû: report, kazna.",clWhite); return 1;} if(iscmd(tmp,"report")){ tmp = strtok(cmdtext,idx); if(!strlen(tmp)){ format(msg,max_line,"REPORT: %i",Report); Message(playerid,msg,clYellow); return 1;} pint = strval(tmp); if(!pint) pint = 0; Report = pint; } else if(iscmd(tmp,"kazna")){ tmp = strtok(cmdtext,idx); if(!strlen(tmp)){ format(msg,max_line,"KAZNA: %i",Kazna); Message(playerid,msg,clYellow); return 1;} pint = strval(tmp); if(pint<0 || pint>100000000){ Message(playerid,"Íåêîðåòíîå êîëè÷åñòâî.",clYellow); return 1;} Kazna = pint; } else { Message(playerid,"Íåèçâåñòíûé ïàðàìåòð",clDarkRed); return 1;} Message(playerid,"Èíôîðìàöèÿ îáíîâëåíà",clYellow); SaveConfig(); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/mkld") || iscmd(cmd,"/makeleader")){ restricted(5);            // Íàçíà÷èòü èãðîêà ëèäåðîì óêàçàííîé ôðàêöèè getTgt("Èñïîëüçîâàíèå: /makeleader {FF0000}[èãðîê] [ôðàêöèÿ]"); checkplayer(tgt); getInt("Èñïîëüçîâàíèå: /makeleader [èãðîê] {FF0000}[ôðàêöèÿ]"); if(5 < pint < 0) return Message(playerid,"Íåëüçÿ áîëüøå 5!",clDarkRed); if(pint == 0){ format(msg,max_line,"Èãðîê %s áîëüøå íå ëèäåð ôðàêöèè.",GetName(tgt)); Message(tgt,"Âû áîëüøå íå ëèäåð ôðàêöèè.",clDarkRed); Message(playerid,msg,clDarkRed); SetPlayerFaction(tgt,0,0); SetPlayerFactionColor(tgt,0); SaveAccount(tgt); return 1;} SetPlayerFaction(tgt,pint,MaxFactionRank[pint]); SetPlayerFactionColor(tgt,pint); format(msg,max_line,"Bû íàçíà÷åíû ëèäåðîì ôðàêöèè %i (%s).",pint,FactionNames[pint]); Message(tgt,msg,clYellow); if(tgt != playerid){ format(msg,max_line,"%s íàçíà÷åí ëèäåðîì ôðàêöèè %i (%s).",GetName(tgt),pint,FactionNames[pint]); Message(playerid,msg,clYellow);} SaveAccount(tgt); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/report")){                                                     // Æàëîáà àäìèíèñòðàöèè strmid(tmp,cmdtext,idx,strlen(cmdtext)); if(!strlen(tmp)){ Message(playerid,"Èñïîëüçîâàíèå: /report {FF0000}[òåêñò]"); return 1;} if(Report == 0){ Message(playerid,"Ðåïîðò îòêëþ÷¸í àäìèíèñòðàöèåé.",clDarkRed); return 1;} if(ReportDelay[playerid]){ format(msg,max_line,"Â ðåïîðò ìîæíî ïèñàòü ðàç â 45 ñåêóíä. Îñòàëîñü: %i ñåê.",ReportDelay[playerid]); Message(playerid,msg,clDarkRed); return 1;} ReportDelay[playerid] = 45; Message(playerid,"Âàøå ñîîáùåíèå áûëî óñïåøíî îòïðàâëåíî àäìèíèñòðàöèè ñåðâåðà.",clYellow); format(msg,max_line,"REPORT: %s (id: %i): %s",name,playerid,tmp); AMessage(msg,clGreen); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/a")){ restricted(1);                                           // Àäìèí ÷àò strmid(tmp,cmdtext,idx,strlen(cmdtext)); if(!strlen(tmp)){ Message(playerid,"Èñïîëüçîâàíèå: /a {FF0000}[òåêñò]"); return 1;} format(msg,max_line,"%s %s[%i]: %s",GetAdminName(playerid),name,playerid,tmp); AMessage(msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/prop")){ restricted(5);                                        // Íàñòðîéêà ñîáñòâåíîñòè getInt("Èñïîëüçîâàíèå: /prop {FF0000}[id] [ïàðàìåòð] {çíà÷åíèå}"); new i = pint, id = 1272; if(HouseInfo[i][hPrice]>0) id = 1273; if(i<0 || i>=max_houses){ Message(playerid,"Íåäîïóñòèìîå çíà÷åíèå (id)",clDarkRed); return 1;} getStr("Èñïîëüçîâàíèå: /prop [id] {FF0000}[ïàðàìåòð|goto] {çíà÷åíèå}"); if(iscmd(tmp,"goto")) { SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); SetPlayerPos(playerid,HouseInfo[i][hPosX],HouseInfo[i][hPosY],HouseInfo[i][hPosZ]); SetPlayerFacingAngle(playerid,HouseInfo[i][hPosR]); SetCameraBehindPlayer(playerid); return 1; } else if(iscmd(tmp,"owner")) { scopy(hOwner[i],strtok(cmdtext,idx)); } else if(iscmd(tmp,"price")) { getInt("Âû íå óêàçàëè ñòîèìîñòü"); if(pint<0 || pint>5000000) { Message(playerid,"Íåêîððåêòíàÿ ñòîèìîñòü",clDarkRed); return 1;} HouseInfo[i][hPrice] = pint; if(HouseInfo[i][hPrice]>0){ if(HouseInfo[i][hPickupID]) DestroyPickup(HouseInfo[i][hPickupID]); HouseInfo[i][hPickupID] = CreatePickup(1273,23,HouseInfo[i][hPosX],HouseInfo[i][hPosY],HouseInfo[i][hPosZ]); } else { if(HouseInfo[i][hPickupID]) DestroyPickup(HouseInfo[i][hPickupID]); HouseInfo[i][hPickupID] = CreatePickup(1272,23,HouseInfo[i][hPosX],HouseInfo[i][hPosY],HouseInfo[i][hPosZ]);} } else if(iscmd(tmp,"intr")) { getInt("Âû íå óêàçàëè id èíòåðüåðà"); HouseInfo[i][hIntr] = pint; } else if(iscmd(tmp,"epos")) { GetPlayerPos(playerid,HouseInfo[i][hEPosX],HouseInfo[i][hEPosY],HouseInfo[i][hEPosZ]); GetPlayerFacingAngle(playerid,HouseInfo[i][hEPosR]); HouseInfo[i][hIntr] = GetPlayerInterior(playerid); } else if(iscmd(tmp,"pos")) { GetPlayerPos(playerid,HouseInfo[i][hPosX],HouseInfo[i][hPosY],HouseInfo[i][hPosZ]); GetPlayerFacingAngle(playerid,HouseInfo[i][hPosR]); if(HouseInfo[i][hPickupID]) DestroyPickup(HouseInfo[i][hPickupID]); HouseInfo[i][hPickupID] = CreatePickup(id,23,HouseInfo[i][hPosX],HouseInfo[i][hPosY],HouseInfo[i][hPosZ]); } else { Message(playerid,"Äîïóñòèìûå ïàðàìåòðû: pos, cpos, price, owner"); return 1;} if(strlen(hOwner[i])<3) hOwner[i] = "no-one"; Message(playerid,"Èíôîðìàöèÿ îáíîâëåíà"); SaveProp(i); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/propadd")){ restricted(3);                                     // Ñîçäàòü ñîáñòâåíîñòü getInt("Èñïîëüçîâàíèå: /propadd {ff0000}[ñòîèìîñòü]"); if(pint<0 || pint>10000000) { Message(playerid,"Íåêîððåêòíàÿ ñòîèìîñòü!",clDarkRed); return 1;} GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid, a); PropCreate(0, 0, pint, x, y, z, a); SetIcons(playerid); new id = GetNearestHouses(playerid,1.0); format(msg,max_line,"Cîáñòâåííîñòü äîáàâëåíà, id: %d",id); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/bizadd")){ restricted(4);                                      // Ñîçäàòü áèçíåñ getInt("Èñïîëüçîâàíèå: /bizadd {ff0000}[ñòîèìîñòü]"); if(pint<0 || pint>10000000) { Message(playerid,"Íåêîððåêòíàÿ ñòîèìîñòü!",clDarkRed); return 1;} GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid, a); BizCreate(0, 0, pint, x, y, z, a); new id = GetNearestBiznes(playerid,1.0); format(msg,max_line,"Áèçíåñ äîáàâëåí, id: %d",id); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/spec")){ restricted(1);                                        // Ñëåæêà çà èãðîêîì tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { if(SpectateType[playerid] == 0) { Message(playerid,"Èñïîëüçîâàíèå: /spec [èãðîê]",clWhite); } else { SpectateStop(playerid); GameTextForPlayer(playerid,"~r~Spec off",1000,4);} return 1;} user[0] = ReturnUser(tmp); if(!IsPlayerConnected(user[0])) return Message(playerid,"Íåò òàêîãî èãðîêà!",clDarkRed); if(playerid == user[0]) return Message(playerid,"Íåëüçÿ ñëåäèòü çà ñàìèì ñîáîé!",clDarkRed); if(SpectateType[user[0]] == 1) return format(msg,100,"Àäìèíèñòðàòîð %s íàáëþäàåò çà èãðîêîì %s.",GetName(user[0]),GetName(AdminSpecID[user[0]])),Message(playerid,msg); SaveAccount(playerid); SpectateStart(playerid, user[0]); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/goto")){ restricted(1);                                        // Òåëåïîðòèðîâàòüñÿ ê óêàçàííîìó èãðîêó getTgt("Èñïîëüçîâàíèå: /goto {ff0000}[èãðîê]"); /*if(GetPlayerState(tgt) == PLAYER_STATE_SPECTATING){ format(msg,max_line,"Àäìèíèñòðàòîð %s íàáëþäàåò çà èãðîêîì %s.",GetName(tgt),GetName(SpectateID[tgt])); return 1;}*/ Message(playerid,msg); GetPlayerFacingPoint(tgt,x,y,z,-2.0); SetPlayerInterior(playerid,GetPlayerInterior(tgt)); SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(tgt)); TeleportPlayer(playerid,x,y,z,a,0,0); GetPlayerFacingAngle(tgt,x); SetPlayerFacingAngle(playerid,x); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/gethere")){ restricted(2);                                     // Òåëåïîðòèðîâàòü óêàçàííîãî èãðîêà ê ñåáå getTgt("Èñïîëüçîâàíèå: /gethere {ff0000}[èãðîê]"); /*if(GetPlayerState(tgt) == PLAYER_STATE_SPECTATING){ format(msg,max_line,"Àäìèíèñòðàòîð %s íàáëþäàåò çà èãðîêîì %s.",GetName(tgt),GetName(SpectateID[tgt])); return 1;}*/ GetPlayerFacingPoint(playerid,x,y,z,2.0); SetPlayerInterior(tgt,GetPlayerInterior(playerid)); SetPlayerVirtualWorld(tgt,GetPlayerVirtualWorld(playerid)); TeleportPlayer(tgt,x,y,z,a,0,0); GetPlayerFacingAngle(playerid,x); SetPlayerFacingAngle(tgt,x); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/delacc")){ restricted(4);                                      // Óäàëèòü àêêàóíò èãðîêà new query[128]; getTgt("Èñïîëüçîâàíèå: /delacc {FF0000}[èãðîê]"); mysql_format(SQL, query, sizeof(query), "DELETE FROM `Users` WHERE `Name` = '%s'", GetName(tgt)); mysql_tquery(SQL, query, "", ""); format(msg,max_line,"Àêêàóíò èãðîêà %s óñïåøíî óäàë¸í.",GetName(tgt)); Message(playerid,msg,clGreen); Kick(tgt); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tpc")){ restricted(4);                                         // Ñîçäàòü òåëåïîðò new intr = GetPlayerInterior(playerid); GetPlayerPos(playerid,x,y,z); tpCreate(0,intr,x,y,z); new id = GetNearestTP(playerid,1.0); format(msg,max_line,"Tåëåïîðò ñîçäàí, id: %d",id); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tpd")){ restricted(4);                                         // Çàäàòü êîíå÷íóþ ïîçèöèþ óêàçàííîãî òåëåïîðòà getInt("Èñïîëüçîâàíèå: /tpd {FF0000}[id]"); tpSetDPos(pint,playerid); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tpdel")){ restricted(4);                                       // Óäàëèòü óêàçàíûé òåëåïîðò getInt("Èñïîëüçîâàíèå: /tpdel {FF0000}[id]"); DestroyTeleport(pint); Message(playerid,"Âû óñïåøíî óäàëèëè òåëåïîðò."); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tpgoto")){ restricted(4);                                      // Òåëåïîðòèðîâàòüñÿ â èñõîäíóþ ïîçèöèþ óêàçàííîãî òåëåïîðòà getInt("Èñïîëüçîâàíèå: /tpgoto {FF0000}[id]"); SetPlayerPos(playerid,TeleportInfo[pint][tpSPos][0],TeleportInfo[pint][tpSPos][1],TeleportInfo[pint][tpSPos][2]); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tpf")){ restricted(4); getInt("Èñïîëüçîâàíèå: /tpf {FF0000}[id] [ôðàêöèÿ]"); new id = pint; getInt("Èñïîëüçîâàíèå: /tpf [id] {FF0000}[ôðàêöèÿ]"); TeleportInfo[id][tpFaction] = pint; Message(playerid,"Ôðàêöèÿ èçìåíåíà."); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/tinfo")){ restricted(3);                                       // Èíôîðìàöèÿ î áëèæíåì òåëåïîðòå. new id = GetNearestTP(playerid,1.0); if(id < 0){ Message(playerid,"Ïî áëèçîñòè íåò íèêàêèõ òåëåïîðòîâ!",clDarkRed); return 1;} format(msg,max_line,"ID: %d, F: %d",id,TeleportInfo[id][tpFaction]); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/propinfo")){ restricted(3);                                    // Èíôîðìàöèÿ î áëèæíåì äîìå. new id = GetNearestHouses(playerid,1.0); if(id < 0){ Message(playerid,"Ïî áëèçîñòè íåò äîìîâ!",clDarkRed); return 1;} format(msg,max_line,"ID: %d, Price: %d, Owner: %s, Intr: %d",id,HouseInfo[id][hPrice], hOwner[id], HouseInfo[id][hIntr]); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/propdel")){ restricted(4);                                     // Óäàëèòü óêàçàíûé äîì getInt("Èñïîëüçîâàíèå: /propdel {FF0000}[id]"); RemovePlayerMapIcon(playerid,PropIcon[pint][playerid]); DestroyHouse(pint); Message(playerid,"Äîì óñïåøíî óäàë¸í."); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/setskin")){ restricted(4);                                     // Óñòàíîâèòü ñêèí óêàçàííîìó èãðîêó getTgt("Èñïîëüçîâàíèå: /setskin {FF0000}[èãðîê] [ñêèí]"); checkplayer(tgt); getInt("Èñïîëüçîâàíèå: /setskin [èãðîê] {FF0000}[ñêèí]"); new s = pint; if(s<0 || s>299){ Message(playerid,"Íåò òàêîãî ñêèíà!",clDarkRed); return 1;} format(msg,max_line,"Àäìèíèñòðàòîð %s, óñòàíîâèë âàì %i ñêèí.",GetName(playerid), s); Message(playerid, msg, clYellow); format(msg,max_line,"Àäìèíèñòðàòîð %s, óñòàíîâèë èãðîêó %s %i ñêèí.",GetName(playerid), GetName(tgt), s); AMessage(msg, clGreen); SetPlayerSkin(tgt, s); PlayerInfo[tgt][pSkin] = s; SaveAccount(tgt); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/v") || iscmd(cmd,"/veh")){ restricted(5);                      // Ñîçäàòü òðàíñïîðò getInt("Èñïîëüçîâàíèå: /veh {ff0000}[id] [öâåò 1] [öâåò 2]"); new model = strval(tmp); if(model < 400 || model > 611) return Message(playerid,"ID òðàíñïîðòíîãî ñðåäñòâà: [400-611]",clWhite); tmp = strtok(cmdtext,idx); new color1 = strval(tmp); tmp = strtok(cmdtext,idx); new color2 = strval(tmp); GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,a); CreateVehicles(playerid, model, color1, color2, x, y+4.0, z, a); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/delveh")){ restricted(4);                                      // Óäàëèòü óêàçàíûé òðàíñïîðò getInt("Èñïîëüçîâàíèå: /delveh {FF0000}[id]"); DestroyVehicles(pint); Message(playerid,"Ìàøèíà óñïåøíî óäàëåíà."); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/nc")){ restricted(4);                                          // Óçíàòü ID áëèæàéøåé ìàøèíû new vid = GetPlayerNearVehicle(playerid,2.0); if(!vid){ Message(playerid,"Ïîáëèçîñòè íåò àâòîìîáèëåé!",clDarkRed); return 1;} format(msg,max_line,"%s: %i",CarName[GetVehicleModel(vid)-400],vid); Message(playerid,msg,clYellow); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/xyz")){ restricted(3);                                         // Òåëåïîðòèðîâàòüñÿ íà óêàçàíóþ êîîðäèíàòó. tmp = strtok(cmdtext,idx); x = floatstr(tmp); tmp = strtok(cmdtext,idx); y = floatstr(tmp); tmp = strtok(cmdtext,idx); z = floatstr(tmp); TeleportPlayer(playerid,x,y,z,a,0,0); return 1;} //----------------------------------------------------------------------------//  //----------------------------------------------------------------------------// //----------------------------Êîìàíäû èãðîêîâ---------------------------------// //----------------------------------------------------------------------------// if(iscmd(cmd,"/ep")){ new id = GetPlayerVirtualWorld(playerid); //if(PlayerInfo[playerid][pCuffed] > 0) return 1; if(IsPlayerInRangeOfPoint(playerid,2.0,HouseInfo[id][hEPosX],HouseInfo[id][hEPosY],HouseInfo[id][hEPosZ])){ SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); SetPlayerPos(playerid,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ]); SetPlayerFacingAngle(playerid,HouseInfo[id][hPosR]); SetCameraBehindPlayer(playerid); return 1;} id = GetNearestHouses(playerid,2.0); if(id == -1) return 1; if(IsPlayerInRangeOfPoint(playerid,2.0,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ]) && id >= 0){ if(HouseInfo[id][hOpen] == 0) return GameTextForPlayer(playerid,"~r~Closed",1000,6); SetPlayerInterior(playerid,HouseInfo[id][hIntr]); SetPlayerVirtualWorld(playerid,id); SetPlayerPos(playerid,HouseInfo[id][hEPosX],HouseInfo[id][hEPosY],HouseInfo[id][hEPosZ]); SetPlayerFacingAngle(playerid,HouseInfo[id][hEPosR]); SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid,0); SetTimerEx("Unfreze",2000,0,"%i",playerid); return 1;} return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/buybiz")){ for(new id=0; id<max_biznes; id++) if(IsPlayerInRangeOfPoint(playerid,distance_close,BiznesInfo[id][bSPos][0],BiznesInfo[id][bSPos][1],BiznesInfo[id][bSPos][2])){ if(BiznesInfo[id][bPrice]<1) return Message(playerid,"Ýòà ñîáñòâåííîñòü íå ïðîäàåòñÿ",clDarkRed); if(BiznesInfo[id][bPrice] > PlayerInfo[playerid][pMoney]) return Message(playerid,"Ó âàñ íåäîñòàòî÷íî íàëè÷íûõ äåíåã",clDarkRed); UnGivePlayerCash(playerid, BiznesInfo[id][bPrice]); format(msg,max_line,"Bû êóïèëè íîâûé áèçíåñ çà $%i, ïîçäðàâëÿåì ñ ïðèîáðåòåíèåì!",BiznesInfo[id][bPrice]); Message(playerid,msg,clYellow); scopy(bOwner[id],name); BiznesInfo[id][bPrice] = 0; BiznesInfo[id][bOpen] = 1; SaveBiz(id);} return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/buyprop")){ for(new id=0; id<max_houses; id++) if(IsPlayerInRangeOfPoint(playerid,distance_close,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ])){ if(HouseInfo[id][hPrice]<1) return Message(playerid,"Ýòà ñîáñòâåííîñòü íå ïðîäàåòñÿ",clDarkRed); if(HouseInfo[id][hPrice] > PlayerInfo[playerid][pMoney]) return Message(playerid,"Ó âàñ íåäîñòàòî÷íî íàëè÷íûõ äåíåã",clDarkRed); UnGivePlayerCash(playerid, HouseInfo[id][hPrice]); DestroyPickup(HouseInfo[id][hPickupID]); HouseInfo[id][hPickupID] = CreatePickup(1272,23,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ]); format(msg,max_line,"Bû êóïèëè íîâûé äîì çà $%i, ïîçäðàâëÿåì ñ ïðèîáðåòåíèåì!",HouseInfo[id][hPrice]); Message(playerid,msg,clYellow); scopy(hOwner[id],name); HouseInfo[id][hPrice] = 0; HouseInfo[id][hOpen] = 1; SaveProp(id);} return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/sellprop")){ new id = GetNearestHouses(playerid); getInt("Èñïîëüçîâàíèå: /sellprop {ff0000}[ñòîèìîñòü]"); if((pint < 0 || pint > 10000000) && pint!=0){ Message(playerid,"Íåêîððåêòíàÿ ñòîèìîñòü",clDarkRed); return 1;} if(pint){ if(!HouseInfo[id][hPrice]) Message(playerid,"Ñîáñòâåííîñòü âûñòàâëåíà íà ïðîäàæó",clYellow), DestroyPickup(HouseInfo[id][hPickupID]), HouseInfo[id][hPickupID] = CreatePickup(1273,23,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ]); else Message(playerid,"Ñòîèìîñòü ñîáñòâåííîñòè èçìåíåíà",clYellow); } else Message(playerid,"Ñòîèìîñòü ñíÿòà ñ ïðîäàæè",clYellow), DestroyPickup(HouseInfo[id][hPickupID]), HouseInfo[id][hPickupID] = CreatePickup(1272,23,HouseInfo[id][hPosX],HouseInfo[id][hPosY],HouseInfo[id][hPosZ]); HouseInfo[id][hPrice] = pint; SaveProp(id); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/open")){ new id = GetNearestHouses(playerid); if(id<0) return Message(playerid,"Ïîáëèçîñòè íåò äîìîâ èëè áèçíåñîâ",clDarkRed); Message(playerid,"Âû îòêðûëè äâåðü â äîì.",clGreen); HouseInfo[id][hOpen] = 1; SaveProp(id); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/close")){ new id = GetNearestHouses(playerid); if(id<0) return Message(playerid,"Ïîáëèçîñòè íåò äîìîâ èëè áèçíåñîâ",clDarkRed); Message(playerid,"Âû çàêðûëè äâåðü â äîì.",clDarkRed); HouseInfo[id][hOpen] = 0; SaveProp(id); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/r")){ new f = PlayerInfo[playerid][pFaction]; if(f == 0){ Message(playerid,"Ó âàñ íåò ðàöèè!",clDarkRed); return 1;} strmid(tmp,cmdtext,idx,strlen(cmdtext)); if(strlen(tmp) == 0){ Message(playerid,"Èñïîëüçîâàíèå: /r [òåêñò]"); return 1;} format(msg,max_line,">>> [%s] %s: %s",FactionRangNames[f][PlayerInfo[playerid][pRank]],name,tmp); FMessage(f,1,msg,GetPlayerColor(playerid)); return 1;} //----------------------------------------------------------------------------// Êîìàíäû äëÿ ëèäåðîâ. if(iscmd(cmd,"/invite")){ if(PlayerInfo[playerid][pRank] < MaxFactionRank[PlayerInfo[playerid][pFaction]]){ Message(playerid,"Âû íå ìîæåòå ïðèãëàøàòü äðóãèõ èãðîêîâ, òàê êàê íå ÿâëÿåòåñü ëèäåðîì ôðàêöèè!",clDarkRed); return 1;} getTgt("Èñïîëüçîâàíèå: /invite {FF0000}[èãðîê]"); checkdistance(playerid,tgt,distance_normal); if(PlayerInfo[tgt][pFaction] != 0){ Message(playerid,"Íåëüçÿ ïðèãëàñèòü ýòîãî èãðîêà, òàê êàê îí óæå ñîñòîèò âî ôðàêöèè!",clDarkRed); return 1;} new f = PlayerInfo[playerid][pFaction]; format(msg,max_line,"%s ïðåäëaãàåò Âàì âñòóïèòü\nâ åãî ôðàêöèþ {00FF00} %s",name,FactionNames[f]); ShowPlayerDialog(tgt,dialog_invite,DIALOG_STYLE_MSGBOX,"Ëèäåð:",msg,"Äà","Íåò"); format(msg,max_line,"Âû âûñëàëè ïðèãëàøåíèå èãðîêó %s.",GetName(tgt)); Message(playerid,msg,clYellow); Perevod[tgt] = playerid; return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/uninvite")){ if(PlayerInfo[playerid][pRank] < MaxFactionRank[PlayerInfo[playerid][pFaction]]){ Message(playerid,"Âû íå ìîæåòå âûãîíÿòü äðóãèõ èãðîêîâ, òàê êàê íå ÿâëÿåòåñü ëèäåðîì èëè çàìîì êàêîé-ëèáî ôðàêöèè",clDarkRed); return 1;} getTgt("Èñïîëüçîâàíèå: /uninvite {FF0000}[èãðîê]"); if(Logged[tgt] == false) return Message(playerid,"Ýòîò èãðîê åù¸ íå àâòîðèçîâàëñÿ!",clDarkRed); if(PlayerInfo[tgt][pFaction]!=PlayerInfo[playerid][pFaction]) return Message(playerid,"Ýòîò èãðîê íå ÿâëÿåòñÿ ÷ëåíîì âàøåé ôðàêöèè",clDarkRed); if(playerid == tgt) return Message(playerid, "Âû íå ìîæåòå âûêèíóòü èç îðãàíèçàöèè ñåáÿ",clDarkRed); if(PlayerInfo[tgt][pRank] == MaxFactionRank[PlayerInfo[tgt][pFaction]]) return Message(playerid,"Âû íå ìîæåòå óâîëèòü ëèäåðà.",clDarkRed); format(msg,max_line,"%s âûãíàë âàñ èç ñâîåé ôðàêöèè.",name); Message(tgt,msg,clDarkRed); format(msg,max_line,"Bû âûãíàëè %s èç ñâîåé ôðàêöèè.",GetName(tgt)); Message(playerid,msg,clDarkRed); SetPlayerFaction(tgt,0,0); SetPlayerFactionColor(tgt,0); SaveAccount(tgt); return 1;} //----------------------------------------------------------------------------// if(iscmd(cmd,"/giverank")){ if(PlayerInfo[playerid][pRank] < MaxFactionRank[PlayerInfo[playerid][pFaction]]) return Message(playerid,"Âû íå ìîæåòå èçìåíÿòü ðàíã èãðîêàì, òàê êàê íå ÿâëÿåòåñü ëèäåðîì ôðàêöèè!",clDarkRed); format(msg,max_line,"Èñïîëüçîâàíèå: /giverank {FF0000}[èãðîê] [ðàíã(1-%d)]",MaxFactionRank[PlayerInfo[playerid][pFaction]]); getTgt(msg); if(tgt==playerid) return Message(tgt," Çà÷åì âàì èçìåíÿòü ñåáå ðàíã? Âû è òàê ëèäåð!",clYellow); if(PlayerInfo[tgt][pFaction]!=PlayerInfo[playerid][pFaction]) return Message(playerid,"Ýòîò èãðîê íå ÿâëÿåòñÿ ÷ëåíîì âàøåé ôðàêöèè!",clDarkRed); format(msg,max_line,"Èñïîëüçîâàíèå: /giverank [èãðîê] {FF0000}[ðàíã(1-%d)]",MaxFactionRank[PlayerInfo[playerid][pFaction]]); getInt(msg); if(pint<1 || pint>MaxFactionRank[PlayerInfo[playerid][pFaction]]){ format(msg,max_line,"Ðàíã äîëæåí ëåæàòü äèàïàçîíå îò {FF0000}1 äî %d",MaxFactionRank[PlayerInfo[playerid][pFaction]]); return Message(playerid,msg,clDarkRed);} if(PlayerInfo[tgt][pRank] == pint) return Message(playerid,"Ýòîò èãðîê óæå èìååò ýòîò ðàíã!",clDarkRed); new ftgt = PlayerInfo[tgt][pFaction]; format(msg,max_line,"%s èçìåíèë âàø ðàíã ñ '%s' íà '%s'",name,FactionRangNames[ftgt][PlayerInfo[tgt][pRank]],FactionRangNames[ftgt][pint]); Message(tgt,msg,clYellow); format(msg,max_line,"Bû èçìåíèëè ðàíã %s ñ '%s' íà '%s'",GetName(tgt),FactionRangNames[ftgt][PlayerInfo[tgt][pRank]],FactionRangNames[ftgt][pint]); Message(playerid,msg,clYellow); //format(msg, sizeof(msg), "%s ïåðåäàë îäåæäó %s",name,FactionRangNames[ftgt][PlayerInfo[ftgt][pRank]]); //format(msg, sizeof(msg), "%s âçÿë è ïåðåîäåë îäåæäó %s",GetName(tgt),FactionRangNames[ftgt][PlayerInfo[ftgt][pRank]]); SetPlayerFaction(tgt,PlayerInfo[playerid][pFaction],pint); SaveAccount(tgt); return 1;} //----------------------------------------------------------------------------// return Message(playerid,"Íåò òàêîé êîìàíäû.",clWhite);}// Êîíåö public OnPlayerCommandText(playerid, cmdtext[]) //==========================OnPlayerEnterVehicle==============================// public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { 	return 1; }  public OnPlayerExitVehicle(playerid, vehicleid){ new vid = GetPlayerNearVehicle(playerid,2.0); SaveVehicles(vid); return 1;}  public OnPlayerStateChange(playerid, newstate, oldstate){ //-- if(SpectateType[AdminSpecID[playerid]] == 1){ SpectateStart(AdminSpecID[playerid], playerid);} //-- if(newstate == PLAYER_STATE_DRIVER){  } //-- if(oldstate == PLAYER_STATE_DRIVER){  } //-- return 1;}  public OnPlayerEnterCheckpoint(playerid) { 	return 1; }  public OnPlayerLeaveCheckpoint(playerid) { 	return 1; }  public OnPlayerEnterRaceCheckpoint(playerid) { 	return 1; }  public OnPlayerLeaveRaceCheckpoint(playerid) { 	return 1; }  public OnRconCommand(cmd[]) { 	return 1; }  public OnPlayerRequestSpawn(playerid) { 	return 1; }  public OnObjectMoved(objectid) { 	return 1; }  public OnPlayerObjectMoved(playerid, objectid) { 	return 1; }  public OnPlayerPickUpPickup(playerid, pickupid) { 	return 1; }  public OnVehicleMod(playerid, vehicleid, componentid) { 	return 1; }  public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { 	return 1; }  public OnVehicleRespray(playerid, vehicleid, color1, color2) { 	return 1; }  public OnPlayerSelectedMenuRow(playerid, row) { 	return 1; }  public OnPlayerExitedMenu(playerid) { 	return 1; }  public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid){ SetIcons(playerid); return 1;}  public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ //-- Ñèñòåìà òåëåïîðòîâ --// if(newkeys == KEY_WALK){ if(!IsPlayerInAnyVehicle(playerid)) { SetPVarInt(playerid, "NoAB", 1); new f = PlayerInfo[playerid][pFaction]; for(new i=0; i<max_tps; i++){ if(PlayerToPoint(1.5,playerid,TeleportInfo[i][tpSPos][0],TeleportInfo[i][tpSPos][1],TeleportInfo[i][tpSPos][2]) && (f== TeleportInfo[i][tpFaction] || !TeleportInfo[i][tpFaction]) && TeleportInfo[i][tpDPos][0]!=0.0) { SetPlayerInterior(playerid,TeleportInfo[i][tpIntr]); SetPlayerPos(playerid,TeleportInfo[i][tpDPos][0],TeleportInfo[i][tpDPos][1],TeleportInfo[i][tpDPos][2]); SetPlayerFacingAngle(playerid,TeleportInfo[i][tpDPos][3]); SetTimerEx("Unfreze",1000,0,"%i",playerid); TogglePlayerControllable(playerid,0); SetCameraBehindPlayer(playerid);}} OnPlayerCommandText(playerid,"/ep");} return 1;} //== if(newkeys == KEY_YES){ new statscat[26], statscatcount = 0, statsrank[51]; HideItemList(playerid); ShowItemList(playerid); //-- for(new i=CatA; i<CatG+1; i++){ if(LicenseInfo[playerid][i]){ statscatcount += 1; format(statscat,26,"Licenses: %s",CatName[i]); PlayerTextDrawSetString(playerid, TextDrawInvLicenses[playerid],statscat); }else{ statscat = "Íåòó";}} //-- new f = PlayerInfo[playerid][pFaction]; new r = PlayerInfo[playerid][pRank]; if(r) format(statsrank,51,"Fraction: %s - %s", FactionNames[f],FactionRangNames[f][r]); else statsrank = "Íåò"; PlayerTextDrawSetString(playerid, TextDrawInvFraction[playerid],statsrank);  TextDrawShowForPlayer(playerid, TextDrawInvFon); TextDrawShowForPlayer(playerid, TextDrawInvMenu); TextDrawShowForPlayer(playerid, TextDrawInvPocket); TextDrawShowForPlayer(playerid, TextDrawInvPack); TextDrawShowForPlayer(playerid, TextDrawInvCar); TextDrawShowForPlayer(playerid, TextDrawInvShop); PlayerTextDrawShow(playerid, TextDrawInvLicenses[playerid]); PlayerTextDrawShow(playerid, TextDrawInvFraction[playerid]); PlayerTextDrawShow(playerid, TextDrawInvSkin[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems2[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems3[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems4[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems5[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems6[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems7[playerid]); PlayerTextDrawShow(playerid, TextDrawInvItems8[playerid]);} //==  return 1;}  public OnRconLoginAttempt(ip[], password[], success) { 	return 1; }  public OnPlayerUpdate(playerid){ new h,m,s; gettime(h,m,s);  if(s!=LastSecond[playerid]) { new vid = GetPlayerVehicleID(playerid); if(s%10==0 && vid) SaveVehicles(vid); if(s%3==0) SetIcons(playerid); LastSecond[playerid] = s;} return 1;}  public OnPlayerStreamIn(playerid, forplayerid) { 	return 1; }  public OnPlayerStreamOut(playerid, forplayerid) { 	return 1; }  public OnVehicleStreamIn(vehicleid, forplayerid) { 	return 1; }  public OnVehicleStreamOut(vehicleid, forplayerid) { 	return 1; }  public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ new msg[max_line]; //-- dialogid == 0 if(dialogid == dialog_loot && response){ new Float:p[3]; GetPlayerPos(playerid, p[0], p[1], p[2]); CreateDroppedInv(listitem+1, p[0], p[1], p[2]); ShowLootsDialog(playerid); return 1;} //-- dialogid == 1 if(dialogid == dialog_login){ if(!response) return Kick(playerid); if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, dialog_login, DIALOG_STYLE_PASSWORD, "Àâòîðèçàöèÿ!","íå âåðíûé ïàðîëü:","Îê", "Îòìåíà"); if(strcmp(inputtext, PlayerInfo[playerid][pPassword]) == 0){ new query2[128]; mysql_format(SQL, query2, sizeof(query2), "SELECT * FROM `Admins` WHERE `Name` = '%e' LIMIT 1", GetName(playerid)); mysql_tquery(SQL, query2, "OnAdminDataLoaded", "dd", playerid, MysqlRaceCheck[playerid]); }else{ LoginAttempts[playerid]++; if(LoginAttempts[playerid] >= 3){ Kick(playerid);} else ShowPlayerDialog(playerid, dialog_login, DIALOG_STYLE_PASSWORD, "Àâòîðèçàöèÿ, íå âåðíûé ïàðîëü!", "Ââåäèòå ïàðîëü â ïîëå íèæå:", "Îê", "Îòìåíà");} return 1;} //-- dialogid == 2 if(dialogid == dialog_register){ if(!response) return Kick(playerid); if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, dialog_register, DIALOG_STYLE_PASSWORD, "Ðåãèñòðàöèÿ, ïàðîëü äîëæåí áûòü íå êîðî÷å 6 ñèìâîëîâ!", "Ââåäèòå âàø íîâûé ïàðîëü â ïîëå íèæå:","Îê", "Îòìåíà"); new query[512]; mysql_format(SQL, query, sizeof(query), "INSERT INTO `Users` (`Name`, `Password`) VALUES ('%e', '%s')", GetName(playerid), inputtext); mysql_tquery(SQL, query, "OnPlayerRegister", "d", playerid); return 1;} //-- dialogid == 3 if(dialogid == dialog_alogin){ if(!response) return Kick(playerid); if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, dialog_alogin, DIALOG_STYLE_PASSWORD, "Àäìèí àâòîðèçàöèÿ:", "Òàê êàê òû ÿâëÿåøñÿ àäìèíèñòðàòîðîì","Îê", "Îòìåíà"); if(strcmp(inputtext, AdminInfo[playerid][aPassword]) == 0){ format(msg,max_line,"<ALogin> âîøåë %s[%d]",GetName(playerid),playerid);