Naemnik95 | Дата: Вторник, 22.02.2011, 00:06 | Сообщение # 1 |
|
|
Генерал-полковник |
|
Группа: Пользователи |
Сообщений: 81 |
« 865 » |
|
Статус: |
|
|
В этом уроке я научу вас делать камеру для админов. Команду вырезал из своего мода. В public OnPlayerCommandText Добавляем Quote if (strcmp(cmd, "/ac", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) { new listitems[] = "Тюрьма(LSPD)\nАвтошкола(1)\nАвтошкола(2)\nЛСПД(1)\nЛСПД(2)\nВокзал(ЛС)\nВокзал(СФ)\nБлокпост(1)\nБлокпост(2)\nТюрьма(LVPD)"; ShowPlayerDialog(playerid, 7724, DIALOG_STYLE_LIST, "Выберите камеру", listitems, "Выбрать", "Закрыть"); } else { SendClientMessage(playerid, COLOR_GREY, " * Вы не администратор!"); return 1; } } return 1; } if (strcmp(cmd, "/acoff", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1) { SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1); } else { SendClientMessage(playerid, COLOR_GREY, " * Вы не администратор!"); return 1; } } return 1; } Потом идем в public OnDialogResponse И добавляем диалоги Quote else if(dialogid == 7724) { if(response) { if(listitem == 0) { SetPlayerPos(playerid,264.6031,82.5974,1004.6830); SetPlayerInterior(playerid, 6); TogglePlayerControllable(playerid, 1); } else if(listitem == 1) { SetPlayerPos(playerid,-2039.7251,-49.8897,47.2874); SetPlayerFacingAngle(playerid, 192.1116); SetPlayerCameraPos(playerid,-2040.9463,-82.0277,46.6044); SetPlayerCameraLookAt(playerid,-2026.7064,-99.5795,35.1641); TogglePlayerControllable(playerid, 0); } else if(listitem == 2) { SetPlayerPos(playerid,-2039.7251,-49.8897,47.2874); SetPlayerFacingAngle(playerid, 127.2510); SetPlayerCameraPos(playerid,-2035.6626,-80.4346,47.2874); SetPlayerCameraLookAt(playerid,-2073.1155,-100.7583,35.1641); TogglePlayerControllable(playerid, 0); } else if(listitem == 3) { SetPlayerPos(playerid,1560.8698,-1691.6464,28.3956); SetPlayerFacingAngle(playerid, 86.8541); SetPlayerCameraPos(playerid,1512.8463,-1685.8065,19.2422); SetPlayerCameraLookAt(playerid,1542.3101,-1674.5748,13.5543); TogglePlayerControllable(playerid, 0); } else if(listitem == 4) { SetPlayerPos(playerid,1560.8698,-1691.6464,28.3956); SetPlayerFacingAngle(playerid, 125.6846); SetPlayerCameraPos(playerid,1603.5507,-1612.0603,17.6308); SetPlayerCameraLookAt(playerid,1560.5908,-1631.7638,13.3828); TogglePlayerControllable(playerid, 0); } else if(listitem == 5) { SetPlayerPos(playerid,1742.4553,-1866.1606,30.5643); SetPlayerFacingAngle(playerid, 29.8122); SetPlayerCameraPos(playerid,1738.4972,-1843.5354,18.8039); SetPlayerCameraLookAt(playerid,1743.5466,-1861.4270,13.5775); TogglePlayerControllable(playerid, 0); } else if(listitem == 6) { SetPlayerPos(playerid,-1975.7284,129.6687,36.9623); SetPlayerFacingAngle(playerid, 94.6962); SetPlayerCameraPos(playerid,-1997.2076,123.5897,33.8855); SetPlayerCameraLookAt(playerid,-1986.0776,140.3540,27.6875); TogglePlayerControllable(playerid, 0); } else if(listitem == 7) { SetPlayerPos(playerid,-1733.6768,-583.6322,25.0168); SetPlayerFacingAngle(playerid, 186.1670); SetPlayerCameraPos(playerid,-1781.1466,-577.4357,31.3143); SetPlayerCameraLookAt(playerid,-1761.4740,-599.2040,16.2717); TogglePlayerControllable(playerid, 0); } else if(listitem == 8) { SetPlayerPos(playerid,-1733.6768,-583.6322,25.0168); SetPlayerFacingAngle(playerid, 23.5455); SetPlayerCameraPos(playerid,-1751.7896,-633.7595,20.0092); SetPlayerCameraLookAt(playerid,-1761.7815,-606.9768,16.1557); TogglePlayerControllable(playerid, 0); } else if(listitem == 8) { SetPlayerPos(playerid,196.4424,161.2384,1007.2417); SetPlayerInterior(playerid, 10); TogglePlayerControllable(playerid, 1); } SendClientMessage(playerid, COLOR_LIGHTRED, " * /acoff - отключить камеру."); SetPlayerVirtualWorld(playerid, 0); } else { return 1; } } Камера с видами на автошколу,вокзалы,кпз,и блокпосты лс сф.
|
|
|
|