LoLmerry | Дата: Пятница, 27.09.2013, 20:37:48 | Сообщение # 1 |
Группа: Пользователи
Сообщений: 13
| мне нужно добавить ещё один пункт в меню сервера (/menu)... что бы при нажатии на него, использовалась команда /gangg вот оно вроде меню Код public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == 262144) OnPlayerCommandText(playerid,"/radio"); if ((newkeys==KEY_SUBMISSION)) { if(IsPlayerInAnyVehicle(playerid)) ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Игровое меню", "{005EFF}Тюнинг\n{005EFF}Телепорты\n{005EFF}Радио\n{005EFF}Автомобили\n{005EFF}Управление персонажем\n{005EFF}Помощь\n{005EFF}Отсчёт\n{005EFF}Настройки\n{005EFF}Управление Авто\n{005EFF}Сброс очков", ">>", "X"); } if ((newkeys==1024)) { if(!IsPlayerInAnyVehicle(playerid)) ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Игровое меню", "{005EFF}Тюнинг\n{005EFF}Телепорты\n{005EFF}Радио\n{005EFF}Автомобили\n{005EFF}Управление персонажем\n{005EFF}Помощь\n{005EFF}Отсчёт\n{005EFF}Настройки\n{005EFF}Управление Авто\n{005EFF}Сброс очков", ">>", "X"); } if( newkeys == 1 || newkeys == 9 || newkeys == 33 && oldkeys != 1 || oldkeys != 9 || oldkeys != 33) { new Car = GetPlayerVehicleID(playerid), Model = GetVehicleModel(Car); switch(Model) { case 446,432,448,452,424,453,454,461,462,463,468,471,430,472,449,473,481,484,493,495,509,510,521,538,522,523,532,537,570,581,586,590,569,595,604, 611: return 0; } AddVehicleComponent(GetPlayerVehicleID(playerid), 1010); } return 1; }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new carid = GetPlayerVehicleID(playerid); new engine,lights,alarm,doors,bonnet,boot,objective; if(dialogid == 0)//так же не моё, из AutoMenu { if(response) { if(listitem == 0)//капот отк { GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(carid,engine,lights,alarm,doors,true,boot,objective); } else if(listitem == 1)//багажник отк { GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,true,objective); } else if(listitem == 2)//капот зак { GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(carid,engine,lights,alarm,doors,false,boot,objective); } else if(listitem == 3)//багажник зак { GetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(carid,engine,lights,alarm,doors,bonnet,false,objective); } else if(listitem == 5) { ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Неоновая подсветка","{ffffff}Красный\n{0033CC}Синий\n{00ff00}Зелёный\n{FFFF00}Желтый\n{FEBFEF}Розовый\nБелый\nУдалить Неон",">>","X"); } if(listitem==6) { ShowPlayerDialog(playerid,6542,DIALOG_STYLE_LIST,"Мигалки","На крышу\nНа капот\nНа багажник\nВ салон\nУдалить мигалки",">>","X"); } else if(listitem == 4)//смена номера { ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{00ff00}Смена номера","{ffffff}Введите номера авто в окошко",">>","X"); return 1; } } } if(dialogid == 999) { if(response) { if(listitem == 0) { SetPlayerTime(playerid, 00, 00); } if(listitem == 1) { SetPlayerTime(playerid, 01, 00); } if(listitem == 2) { SetPlayerTime(playerid, 02, 00); } if(listitem == 3) { SetPlayerTime(playerid, 03, 00); } if(listitem == 4) { SetPlayerTime(playerid, 04, 00); } if(listitem == 5) { SetPlayerTime(playerid, 05, 00); } if(listitem == 6) { SetPlayerTime(playerid, 06, 00); } if(listitem == 7) { SetPlayerTime(playerid, 07, 00); } if(listitem == 8) { SetPlayerTime(playerid, 08, 00); } if(listitem == 9) { SetPlayerTime(playerid, 09, 00); } if(listitem == 10) { SetPlayerTime(playerid, 10, 00); } if(listitem == 11) { SetPlayerTime(playerid, 11, 00); } if(listitem == 12) { SetPlayerTime(playerid, 12, 00); } if(listitem == 13) { SetPlayerTime(playerid, 13, 00); } if(listitem == 14) { SetPlayerTime(playerid, 14, 00); } if(listitem == 15) { SetPlayerTime(playerid, 15, 00); } if(listitem == 16) { SetPlayerTime(playerid, 16, 00); } if(listitem == 17) { SetPlayerTime(playerid, 17, 00); } if(listitem == 18) { SetPlayerTime(playerid, 18, 00); } if(listitem == 19) { SetPlayerTime(playerid, 19, 00); } if(listitem == 20) { SetPlayerTime(playerid, 20, 00); } if(listitem == 21) { SetPlayerTime(playerid, 21, 00); } if(listitem == 22) { SetPlayerTime(playerid, 22, 00); } if(listitem == 23) { SetPlayerTime(playerid, 23, 00); } } } if(dialogid == 7) { if(response) { if(listitem == 0)return OnPlayerCommandText(playerid,"/admins"); if(listitem == 1) { ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "{00ff00}Команды сервера", "{ffffff}/menu - {00ff00}вызвать меню сервера\n{ffffff}/r - {00ff00}сбросить очки\n{ffffff}/colors - {00ff00} цвет ника\n{ffffff}/radio - {00ff00}вызвать меню радио\n{ffffff}/count - {00ff00}отсчёт\n{ffffff}/dt - {00ff00}изменить мир\n{ffffff}/pm - {00ff00}отправить личное сообщение\n{ffffff}/admins - {00ff00}администраторы онлайн", ">>", ""); } if(listitem == 2) { ShowPlayerDialog(playerid, 88, DIALOG_STYLE_MSGBOX, "{00ff00}Возможные проблемы", "{ffffff}Если радио не работает, попробуйте прибавить громкости в {00ff00}меню игры (ESC)", ">>", ""); } } } if(dialogid == 1) { if(response) { if(listitem == 0) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18647,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18647,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem == 1) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18648,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18648,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem == 2) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18649,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18649,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem==3) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18650,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18650,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem==4) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18651,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18651,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem==5) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); neon[playerid][0] = CreateObject(18652,0,0,0,0,0,0,100.0); neon[playerid][1] = CreateObject(18652,0,0,0,0,0,0,100.0); AttachObjectToVehicle(neon[playerid][0], GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(neon[playerid][1], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); } else if(listitem==6) { DestroyObject(neon[playerid][0]); DestroyObject(neon[playerid][1]); } } } if(dialogid == 2) { if(response) { if(!strlen(inputtext)) { ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{00ff00}Смена номера","{ffffff}Введите номера авто в окошко",">>","X"); return 1; } if(strlen(inputtext) > 10) { ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"{00ff00}Смена номера","{ffffff}Cлишком длинный номер\n{ffffff}Введите номера авто в окошко",">>","X"); return 1; } new Float:x,Float:y,Float:z,Float:ang; SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext); GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z); GetVehicleZAngle(GetPlayerVehicleID(playerid),ang); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z); PutPlayerInVehicle(playerid,GetPlayerVehicleID(playerid),0); SetVehicleZAngle(GetPlayerVehicleID(playerid),ang); } } if(dialogid == 3)//главное меню { if(response) { if(listitem == 0) { if(IsPlayerInAnyVehicle(playerid)) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Тюнинг меню", "Диски \nГидравлика \nАрхангел Тюнинг \nЦвет \nВинилы ", ">>", "X"); else SendClientMessage(playerid, COLOR_RED, "{00ff00}[Ошибка]: {ffffff}Вы не водитель машины"); } else SendClientMessage(playerid, COLOR_RED, "{00ff00}[Ошибка]: {ffffff}Вы не в машине"); }
if(listitem == 1)ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Телепорты", "Дрифт места\nАэропорты\nГорода", ">>", "X"); if(listitem == 2)return OnPlayerCommandText(playerid,"/radio"); if(listitem == 3) { if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"{00ff00}[Ошибка]: {ffffff}Вы уже в транспорте"); ShowPlayerDialog(playerid,9,DIALOG_STYLE_LIST,"Автомобили","{00ff00}Elegy\n{00E1FF}Sultan\n{00E1FF}Infernus\n{00E1FF}Banshee\n{00E1FF}Baffal o\n{00E1FF}Cheetah\n{00E1FF}Turismo\n{00E1FF}Uranus\n{00E1FF}Bullet\n{00E1FF}Jester\n{00E1FF}Phoenix\n{00E1FF}SuperGT\n{00E1FF}Flash\n{00E1F F}ZR-350\n{00E1FF}Huntley\n{00E1FF}Stretch\n{00E1FF}Police\n{00E1FF}Taxi\n{00E1FF}NRG-500\n{00E1FF}Sanchez\n{00E1FF}Kart\n{00E1FF}BMX\n{00E1 FF}MtBike\n{00E1FF}Maverick\n{00E1FF}Shamal\n{00E1FF}Beagle",">>","X"); return 1; } if(listitem == 4)ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Управление Персонажем", "Пополнить броню\nПополнить жизни\nСменить скин\n{00ff00}Объекты\n{FFFF00}Анимации\n{E3930F}Самоубийство", ">>", "X"); if(listitem == 5)ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Помощь", "Администраторы {00ff00}онлайн\n{00ff00}Команды {ffffff}сервера\nВозможные проблемы", ">>", "X"); if(listitem == 6)return OnPlayerCommandText(playerid,"/count"); if(listitem == 7)ShowPlayerDialog(playerid, 3013, DIALOG_STYLE_LIST, "Настройки", "Цвет ника\nВремя сервера\nНики игроков\nТекстдравы", ">>", "X"); if(listitem == 8) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000AA,"{00ff00}[Ошибка]: {ffffff}Вы должны быть в машине"); ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Управление авто","Открыть капот\nОткрыть багажник\nЗакрыть капот\nЗакрыть багажник\nСменить номер\nНеон\nМигалки",">>","X"); } if(listitem == 9)return OnPlayerCommandText(playerid,"/r"); } }
if(dialogid == 8)//upravl persom { if(response) { if(listitem == 0) { SetPlayerArmour(playerid,100); ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Управление Персонажем", "Пополнить броню\nПополнить жизни\nСменить скин\n{00ff00}Объекты\n{FFFF00}Анимации\n{E3930F}Самоубийство", ">>", "X"); PlayerPlaySound(playerid,1149,0.0,0.0,0.0); } if(listitem == 3)ShowPlayerDialog(playerid, 1111, DIALOG_STYLE_LIST, "Объекты", "Красный дым\nБаскетбольный мяч\nВодяной шар\nЛоготип sa-mp\n{ffffff}Убрать объекты", ">>", "X"); if(listitem == 4)ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Меню Анимации", "Напитки и Cигареты\nТанцы\nЗвонки\nРазное\n{00ff00}Остановить анимацию", ">>", "X"); if(listitem == 5) { SetPlayerHealth(playerid,0); PlayerPlaySound(playerid,1149,0.0,0.0,0.0); } if(listitem == 1) { SetPlayerHealth(playerid,100); ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Управление Персонажем", "Пополнить броню\nПополнить жизни\nСменить скин\n{00ff00}Объекты\n{FFFF00}Анимации\n{E3930F}Самоубийство", ">>", "X"); PlayerPlaySound(playerid,1149,0.0,0.0,0.0); } if(listitem == 2)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "{00ff00}Смена скина", "{ffffff}Введите id", ">>", "X"); } else ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Игровое меню", "Тюнинг\nТелепорты\nРадио\nАвтомобили\nУправление персонажем\nПомощь\n{FFFF00}Отсчёт\n{00ff00}Настройки\n{E3930F}Управление Авто\n{0033CC}Сброс очков", ">>", "X"); }
|
|
|
|