Rider405402
Дата: Четверг, 02.01.2014, 15:37 | Сообщение # 1
Любитель
Сообщений: 47
Статус: Offline
Вообщем ко всем new: к командам: Код
CMD:tv(playerid, params[])//if(strcmp(cmd, "/tv", true) == 0) { if (!IsPlayerInRangeOfPoint(playerid, 31.0,HouseInfo[PlayerInfo[playerid][pPhousekey]][hExitx], HouseInfo[PlayerInfo[playerid][pPhousekey]][hExity], HouseInfo[PlayerInfo[playerid][pPhousekey]][hExitz])) return SCM(playerid, -1, "Вы не у себя дома"); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, 1678.2035, -1481.4669, 110.1527); SetPlayerCameraPos(playerid, 1678.2035, -1481.4669, 110.1527); SetPlayerCameraLookAt(playerid, 1614.6501, -1576.7792, 88.1527); SPD(playerid, 99, DIALOG_STYLE_LIST,"{ffd200}Телевидение", "One TV","Выбрать","Закрыть"); return 1; } CMD:camera(playerid, params[])//if(strcmp(cmd, "/camera", true) == 0) { //if(PlayerInfo[playerid][pMember] == номер фракции) return SCM(playerid, -1, "Вы не состоите в ТВ центре"); if(sscanf(params, "d", params[0])) return SCM(playerid, -1, "Используйте /camera [0-2]"); camerapos = params[0]; return 1; } CMD:tvoff(playerid, params[])//if(strcmp(cmd, "/tvoff", true) == 0) { SetPlayerInterior(playerid,HouseInfo[PlayerInfo[playerid][pPhousekey]][hInt]); SetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][pPhousekey]][hExitx], HouseInfo[PlayerInfo[playerid][pPhousekey]][hExity],HouseInfo[PlayerInfo[playerid][pPhousekey]][hExitz]); SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pPhousekey]+50); SetCameraBehindPlayer(playerid); SetPVarInt(playerid, "ZRITEL", 0); return 1; } CMD:tvchat(playerid, params[])//if(strcmp(cmd, "/tvchat", true) == 0) { if(sscanf(params, "s[133]", params[0])) return SCM(playerid, -1, "Используйте /tvchat [текст]"); for(new i = 0; i < GetMaxPlayers(); i++) if(GetPVarInt(i, "ZRITEL") > 0) { new str[144],name[25]; GetPlayerName(playerid, name, sizeof(name)); format(str, sizeof(str), "[Ведущий] %s[%d]: %s", name,playerid,params[0]); SCM(i, 0x99C300FF, str); } return 1; }
и в диалоги: Код
case 99://if(dialogid == 99) { if(!response) return CallLocalFunction("OnPlayerCommandText", "is", playerid, "/tvoff");//OnPlayerCommandText(playerid,"/tvoff"); if(listitem == 0) { if(camerapos == 0) { SetPlayerPos(playerid,1798.3508,-1305.6378,125.7266); SetPlayerCameraPos(playerid, 1827.68, -1310.18, 67.90); SetPlayerCameraLookAt(playerid, 1826.33, -1314.62, 66.04); SetPVarInt(playerid, "ZRITEL",1); } else if(camerapos == 1) { SetPlayerPos(playerid,1798.3508,-1305.6378,125.7266); SetPlayerCameraPos(playerid, 1825.75, -1278.72, 67.89); SetPlayerCameraLookAt(playerid, 1829.29, -1275.73, 66.03); SetPVarInt(playerid, "ZRITEL",1); } else if(camerapos == 2) { SetPlayerPos(playerid,1798.3508,-1305.6378,125.7266); SetPlayerCameraPos(playerid, 1795.83, -1304.39, 67.34); SetPlayerCameraLookAt(playerid, 1796.02, -1309.03, 65.48); SetPVarInt(playerid, "ZRITEL",1); } } return 1; }
И сам маппинг:
//Студия ТВ CreateObject(19128, 1830.857788,-1274.340576,64.832496, 0.000000,0.000000,39.000000); CreateObject(19128, 1833.378662,-1272.314575,67.294937, -89.799987,-95.500007,32.199993); CreateObject(16322, 1824.330810,-1277.507934,68.792510, 0.000000,0.000000,119.100028); CreateObject(1518, 1821.840942,-1274.546752,67.658348, 20.800003,0.000000,-58.399997); CreateObject(1518, 1823.596435,-1277.461669,67.631141, 27.399990,0.000000,-61.899993); CreateObject(1518, 1823.993408,-1278.202270,67.616111, 27.300001,0.999999,-60.999996); CreateObject(1518, 1825.501831,-1280.472656,67.621673, 22.600000,0.000000,-99.400001); CreateObject(1518, 1822.359008,-1275.648559,67.678489, 20.899997,-1.600000,-78.799995); CreateObject(2008, 1821.875000,-1274.133300,64.782493, 0.000000,0.000000,-62.499984); CreateObject(2008, 1823.837768,-1277.989013,64.782485, 0.000000,0.000000,-62.299995); CreateObject(2008, 1822.868530,-1276.046142,64.782508, 0.000000,0.000000,-62.599990); CreateObject(1998, 1824.916259,-1279.988159,64.782562, -0.200000,0.000000,-151.999969); CreateObject(16322, 1829.236083,-1310.785034,68.822486, 0.000000,0.000000,0.000000); CreateObject(2181, 1824.707031,-1307.827026,64.822509, 0.000000,0.000000,90.200004); CreateObject(1429, 1825.556152,-1310.300537,67.612495, 12.600000,0.200000,163.399963); CreateObject(1429, 1827.688110,-1310.354125,67.647155, 12.100000,0.000000,179.800018); CreateObject(1429, 1830.016601,-1310.399414,67.625396, 19.200002,0.000000,-172.300033); CreateObject(1429, 1831.530151,-1310.372314,67.648818, 13.300001,-3.299999,-166.600006); CreateObject(1429, 1833.293823,-1310.230957,67.671577, 20.400003,-5.399998,-147.500015); CreateObject(1999, 1832.645385,-1310.705688,64.752517, 0.000000,0.000000,178.599990); CreateObject(2184, 1827.089599,-1315.974609,64.802520, 0.000000,0.000000,166.599990); CreateObject(1714, 1825.605957,-1317.666992,64.832519, 0.000000,0.000000,160.799987); CreateObject(2206, 1829.992675,-1310.720458,64.742500, 0.000000,0.000000,-179.799972); CreateObject(1999, 1826.653320,-1310.750000,64.732490, 0.000000,0.000000,-179.700012); CreateObject(1712, 1793.871826,-1311.404418,64.775451, 0.000000,0.000000,150.399978); CreateObject(1712, 1799.924316,-1310.823242,64.772514, 0.000000,0.000000,-153.000015); CreateObject(2024, 1795.815185,-1311.040527,64.715461, 0.000000,0.000000,0.000000); CreateObject(2245, 1796.325805,-1312.007324,65.065475, 0.000000,0.000000,0.000000); CreateObject(16322, 1795.682128,-1303.908325,68.832489, 0.000000,0.000000,0.000000); CreateObject(1786, 1796.330566,-1303.675903,67.219062, 11.100000,0.000000,-178.799957); CreateObject(1786, 1794.184692,-1303.575317,67.203758, 7.799999,0.000000,176.799972); CreateObject(1786, 1799.585449,-1303.495483,67.242111, 7.099998,0.000000,-148.699996); CreateObject(1786, 1791.716552,-1303.488891,67.318763, 6.699998,0.000000,152.699996); CreateObject(2205, 1798.538574,-1303.942260,64.782493, 0.000000,0.000000,-179.299942); CreateObject(2008, 1795.779541,-1303.966918,64.832542, 0.000000,0.000000,-179.400024); CreateObject(2009, 1793.056640,-1304.117675,64.782524, 0.000000,0.000000,90.899993);
Скриншоты: /camera - выбрать место где будет стоять камера /tv с дома включать, если с любого места хотите, убирайте проверку /tvoff - вырубить тв /tvchat - как бы для ведущих, текст видят только те кто смотрит ТВ
Сообщение отредактировал Rider405402 - Четверг, 02.01.2014, 15:38