Дмитрий |
Дата: Понедельник, 06.08.2012, 16:48 | Сообщение # 1 | Сообщить о нерабочей теме
|
Регистрация: | 03.12.2011
|
Страна: | Российская Федерация |
Репутация: |
14
|
Сообщений: | 1421 |
Награды: |
4
+
|
Статус: |
|
| Ко всем NEW
Code new DiskoRound = 0; new Dens[28]; new discodrink[6];
В public OnPlayerPickUpPickup(playerid, pickupid)
Code else if(pickupid == discodrink[0]) // { SetPlayerSpecialAction(playerid,22); } else if(pickupid == discodrink[5]) // { SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,1477.3622,-1690.9512,14.0469); SetPlayerFacingAngle(playerid, 209.7472); } else if(pickupid >= discodrink[1] && pickupid <= discodrink[4]) // { SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid, 0); SetPlayerPos(playerid,2394.4033,-662.6892,127.8943); SetPlayerFacingAngle(playerid, 209.7472); }
В конец мода добавим:
Code forward Diskach(playerid); public Diskach(playerid) { discodrink[0] = CreatePickup(1486,23,2397.5051,-650.3303,127.3642);//ïèêàï áóõëà íà äèñêîòåêå discodrink[1] = CreatePickup(19056,23,1479.1432,-1685.8837,14.0469);//âõîä âîçëå ìåðèè íà äèñêîòåêó discodrink[2] = CreatePickup(19056,23,1765.8376,-1887.0294,13.5541);//âõîä âîçëå ðåñïû 1-3 ëâë íà äèñêîòåêó discodrink[3] = CreatePickup(19056,23,-1969.6345,137.7862,27.6875);//âõîä âîçëå ðåñïû 3-6 ëâë íà äèñêîòåêó discodrink[4] = CreatePickup(19056,23,2819.6814,1308.1241,10.9609);//âõîä âîçëå ðåñïû 6+ ëâë íà äèñêîòåêó discodrink[5] = CreatePickup(1239,23,2400.2122,-646.8492,127.2065);//âûõîä ñ äèñêîòåêè ê ìåðèè Dens[0] = CreateDynamicObject(14416, 2348.842773,-691.968811,133.608032, 0.000000,0.000000,0.000000); Dens[1] = CreateDynamicObject(2229, 2357.753417,-650.372619,127.165748, 0.000000,0.000000,83.099975); Dens[2] = CreateDynamicObject(2235, 2358.682373,-649.090148,127.031829, -0.199999,-0.099998,87.099998); Dens[3] = CreateDynamicObject(2229, 2357.779785,-645.957824,127.004852, 0.000000,0.000000,84.400024); Dens[4] = CreateDynamicObject(2232, 2357.661865,-648.340698,131.386444, 0.000000,0.000000,95.100021); Dens[5] = CreateDynamicObject(3095, 2381.818603,-653.120117,123.759414, 0.000000,-87.199966,0.000000); Dens[6] = CreateDynamicObject(3095, 2381.860351,-645.694213,123.685020, -87.299980,0.399999,89.700019); Dens[7] = CreateDynamicObject(19122, 2381.873046,-651.220458,128.841552, 0.000000,0.000000,0.000000); Dens[8] = CreateDynamicObject(19122, 2381.935302,-647.284912,128.840652, 0.000000,0.000000,0.000000); Dens[9] = CreateDynamicObject(2231, 2357.775634,-648.049804,128.007751, -7.999995,-88.199981,90.099945); Dens[10] = CreateDynamicObject(3095, 2368.673583,-654.147399,127.793357, 0.000000,0.000000,0.000000); Dens[11] = CreateDynamicObject(3877, 2381.585205,-641.257385,127.870574, 0.000000,0.000000,0.000000); Dens[12] = CreateDynamicObject(3095, 2377.576904,-640.980773,123.597038, -88.299987,3.399992,-175.999862); Dens[13] = CreateDynamicObject(3095, 2369.124023,-641.037170,123.820281, -0.000000,-88.600097,90.600028); Dens[14] = CreateDynamicObject(3877, 2364.638427,-640.998046,127.945236, 0.000000,0.000000,0.000000); Dens[15] = CreateDynamicObject(3095, 2364.320312,-653.537597,123.735954, 0.000000,89.300003,0.000000); Dens[16] = CreateDynamicObject(3877, 2364.672851,-657.697631,127.958694, 0.000000,0.000000,0.000000); Dens[17] = CreateDynamicObject(3095, 2368.953369,-658.201599,123.813362, 0.100000,90.799987,90.200050); Dens[18] = CreateDynamicObject(3095, 2377.468261,-658.129150,123.818572, -89.799980,0.000000,0.000000); Dens[19] = CreateDynamicObject(3877, 2381.600585,-657.780822,127.851470, 0.000000,0.000000,0.000000); Dens[20] = CreateDynamicObject(14537, 2402.847900,-652.275024,128.337142, -2.300000,0.399999,0.000000); Dens[21] = CreateDynamicObject(3095, 2377.612060,-654.148254,127.786117, 0.000000,0.000000,0.000000); Dens[22] = CreateDynamicObject(3095, 2377.622070,-645.145446,127.790039, 0.000000,0.000000,0.000000); Dens[23] = CreateDynamicObject(3095, 2368.671630,-645.150634,127.799842, 0.000000,0.000000,0.000000); Dens[24] = CreateDynamicObject(14416, 2384.056640,-649.277954,125.097061, 0.000000,1.200000,89.599952); Dens[25] = CreateDynamicObject(18102, 2369.779541,-645.445617,134.697418, 0.000000,-1.599999,93.100013); Dens[26] = CreateDynamicObject(18102, 2377.373046,-644.375427,134.905426, 0.000000,0.000000,109.399986); Dens[27] = CreateDynamicObject(3095, 2364.208740,-644.637573,123.623596, 0.500000,90.299942,0.599999); return 1; }
forward OffDiskach(); public OffDiskach() { DestroyPickup(discodrink[0]); DestroyPickup(discodrink[1]); DestroyPickup(discodrink[2]); DestroyPickup(discodrink[3]); DestroyPickup(discodrink[4]); DestroyPickup(discodrink[5]); DestroyDynamicObject(Dens[0]); DestroyDynamicObject(Dens[1]); DestroyDynamicObject(Dens[2]); DestroyDynamicObject(Dens[3]); DestroyDynamicObject(Dens[4]); DestroyDynamicObject(Dens[5]); DestroyDynamicObject(Dens[6]); DestroyDynamicObject(Dens[7]); DestroyDynamicObject(Dens[8]); DestroyDynamicObject(Dens[9]); DestroyDynamicObject(Dens[10]); DestroyDynamicObject(Dens[11]); DestroyDynamicObject(Dens[12]); DestroyDynamicObject(Dens[13]); DestroyDynamicObject(Dens[14]); DestroyDynamicObject(Dens[15]); DestroyDynamicObject(Dens[16]); DestroyDynamicObject(Dens[17]); DestroyDynamicObject(Dens[18]); DestroyDynamicObject(Dens[19]); DestroyDynamicObject(Dens[20]); DestroyDynamicObject(Dens[21]); DestroyDynamicObject(Dens[22]); DestroyDynamicObject(Dens[23]); DestroyDynamicObject(Dens[24]); DestroyDynamicObject(Dens[25]); DestroyDynamicObject(Dens[26]); DestroyDynamicObject(Dens[27]); return 1; }
Теперь перед public GzCheck() на строчку выше вставим:
Code new PlayMusic[MAX_PLAYERS];
Теперь ко всем командам добавим:
Code if(strcmp(cmd, "/adisco", true) == 0) { for(new i=0;i<MaxPlayers;i++) { if(IsPlayerConnected(i)) { if(DiskoRound == 1) return SendClientMessage(playerid,COLOR_LIGHTRED,"Äèñêàòåêà óæå íà÷àòà!"); DiskoRound = 1; Diskach(i); return 1; } } return 1; } if(strcmp(cmd, "/adiscooff", true) == 0) { for(new i=0;i<MaxPlayers;i++) { if(IsPlayerConnected(i)) { if(DiskoRound == 0) return SendClientMessage(playerid,COLOR_LIGHTRED,"Äèñêàòåêà íå íà÷àòà!"); StopAudioStreamForPlayer(i); DiskoRound = 0; OffDiskach(); return 1; } } return 1; }
Музыка по желание (если хотите в RLS можно просто заменить данный паблик)
Code public GzCheck() { new string[144]; for(new i=0;i<MaxPlayers;i++) { if(!IsPlayerConnected(i)) continue; { if(PlayerToPoint(50, i,2369.2341,-648.9675,127.6172) && PlayMusic[i] == 0 && DiskoRound == 1)// ãäå x y z ïèøèòå êîîðäèíàòû { PlayAudioStreamForPlayer(i, "http://radio.maks-fm.ru:8000/maksfm128.m3u",2369.2341,-648.9675,127.6172);// ãäå x y z ïèøèòå êîîðäèíàòû. PlayMusic[i] = 1; } else if(!PlayerToPoint(50, i, 2369.2341,-648.9675,127.6172) && PlayMusic[i] == 1 && DiskoRound == 0)// ãäå x y z ïèøèòå êîîðäèíàòû { StopAudioStreamForPlayer(i); PlayMusic[i] = 0; } } }
Автор: наверно plakapenka ;D
From Russia With Love!
|
|
|
|