[Мануал] Концертный зал - Форум Cheat-Master.ru
  • Страница 1 из 1
  • 1
Модератор форума: Phoenixxx_Czar, Getbackthere, [CM]OlegEhtler  
[Мануал] Концертный зал
HDD Дата: Вторник, 19.08.2014, 13:20 | Сообщение # 1
Любитель
Сообщений: 36
Статус: Offline
Всем привет! Выкладываю вам концертный зал, функции: включение/отключение музыки в зале, возможность установить вход в зал по билетам либо свободный вход, открытие/закрытие занавеса, смена фона сцены. Управление происходит через команду /hpanel (доступно для администраторов 5+ лвл)

Ко всем переменным:
Код
new hallpick[12];
new ticketprice = 0, bool:ticket[MAX_PLAYERS] = false;
new zanaves[2], bool:statzanaves = false;
new bool:musichall = false, urlaudiostrhall[400], bool:audiostr[MAX_PLAYERS] = false;
new bool:propusk[MAX_PLAYERS] = false, bool:eurostart = false, fonhall;


В public OnGameModeInit
Код
    hallpick[0] = CreatePickup(1318,1,1122.8578,-1127.4215,23.8047,0);
      hallpick[1] = CreatePickup(1318,1,-509.4200,-2597.8044,1483.9840,1);
      hallpick[2] = CreatePickup(1318,1,-493.1520,-2598.1833,1483.9840,1);
      hallpick[3] = CreatePickup(1318,1,-493.1609,-2590.8989,1483.9840,1);
      hallpick[4] = CreatePickup(1318,1,-464.2336,-2611.7209,1489.0840,3);
      hallpick[5] = CreatePickup(1318,1,-475.7336,-2611.7417,1489.1060,3);
      hallpick[6] = CreatePickup(1318,1,-504.8910,-2568.9597,1483.9840,1);
      hallpick[7] = CreatePickup(1318,1,-504.7218,-2566.9944,1483.9840,2);
      hallpick[8] = CreatePickup(1318,1,-493.0407,-2565.3494,1484.9871,2);
      hallpick[9] = CreatePickup(1318,1,-490.7853,-2567.4580,1485.5391,3);
      hallpick[10] = CreatePickup(1274,2,-502.7257,-2605.6863,1483.9840,1);
      hallpick[11] = CreatePickup(1274,2,-499.6479,-2605.7080,1483.9840,1);
      Create3DTextLabel("/tickets",0x33AAFFFF,-502.7257,-2605.6863,1483.9840,15.0,1,1);
      Create3DTextLabel("/tickets",0x33AAFFFF,-499.6479,-2605.7080,1483.9840,15.0,1,1);
      new wallzal1 = CreateObject(18753,-452.5610046,-2572.0258789,1482.4840088,0.0000000,0.0000000,0.0000000); //object(base125mx125m1) (1)
      SetObjectMaterial(wallzal1,0,11305,"station_sfse","ws_stationfloor",0);
      new wallzal2 = CreateObject(18753,-492.1730042,-2571.5820312,1507.5899658,0.0000000,90.0000000,0.0000000); //object(base125mx125m1) (5)
      SetObjectMaterial(wallzal2,0,10948,"skyscrapper_sfs","desgreengrass",0);
      new wallzal3 = CreateObject(18753,-452.3139954,-2612.6201172,1496.2650146,0.0000000,90.0000000,270.0007629); //object(base125mx125m1) (7)
      SetObjectMaterial(wallzal3,0,10948,"skyscrapper_sfs","desgreengrass",0);
      new wallzal4 = CreateObject(18753,-552.4429932,-2567.5000000,1449.6820068,0.0000000,88.0000000,267.9992065); //object(base125mx125m1) (8)
      SetObjectMaterial(wallzal4,0,10948,"skyscrapper_sfs","desgreengrass",0);
      new wallzal5 = CreateObject(18754,-489.5280151,-2682.5959473,1445.0939941,0.0000000,270.0000000,0.0000000); //object(base250mx250m1) (1)
      SetObjectMaterial(wallzal5,0,10948,"skyscrapper_sfs","desgreengrass",0);
      CreateObject(19381,-488.2720032,-2563.0009766,1488.8389893,0.0000000,0.0000000,349.9969482); //object(wall029) (1)
      zanaves[0] = CreateObject(3113,-477.8515625,-2567.9114062,1491.2590332,0.0000000,195.9960938,-90.0000000); //object(carrier_door_sfse) (1)
      SetObjectMaterial(zanaves[0],0,8497,"vgseland","triadcarpet2",0);
      CreateObject(18783,-459.8529968,-2574.5380859,1480.7590332,0.0000000,0.0000000,0.0000000); //object(funboxtop1) (4)
      zanaves[1] = CreateObject(3113,-455.4511719,-2567.9184766,1491.2590332,0.0000000,195.9906006,-90.0000000); //object(carrier_door_sfse) (2)
      SetObjectMaterial(zanaves[1],0,8497,"vgseland","triadcarpet2",0);
      new wallzal6 = CreateObject(18753,-449.6700134,-2572.1621094,1502.2280273,0.0000000,90.0000000,0.0000000); //object(base125mx125m1) (10)
      SetObjectMaterial(wallzal6,0,10948,"skyscrapper_sfs","desgreengrass",0);
      fonhall = CreateObject(18753,-453.4779968,-2555.2509766,1507.2399902,0.0000000,270.0000000,90.0001831); //object(base125mx125m1) (11)
      SetObjectMaterial(fonhall,0,19129,"dancefloors","DanceFloor1",0);
      new wallzal7 = CreateObject(18753,-454.2990112,-2572.3630371,1494.3879395,0.0000000,0.0000000,0.0000000); //object(base125mx125m1) (12)
      SetObjectMaterial(wallzal7,0,10023,"bigwhitesfe","sfe_arch10",0);
      new wallzal8 = CreateObject(18753,-510.3399963,-2580.9069824,1471.3070068,0.0000000,270.0000000,0.0000000); //object(base125mx125m1) (2)
      SetObjectMaterial(wallzal8,0,10948,"skyscrapper_sfs","desgreengrass",0);
      CreateObject(19450,-509.1650085,-2606.1430664,1484.7120361,0.0000000,0.0000000,269.9945068); //object(wall090) (1)
      CreateObject(19404,-502.7850037,-2606.1389160,1484.7120361,0.0000000,0.0000000,270.0000000); //object(wall052) (1)
      CreateObject(19404,-499.6799927,-2606.1499023,1484.7120361,0.0000000,0.0000000,269.9890137); //object(wall052) (3)
      CreateObject(19450,-493.5030029,-2606.1608887,1484.7120361,0.0000000,0.0000000,269.9890137); //object(wall090) (2)
      CreateObject(18783,-479.7269897,-2609.1621094,1485.6059570,0.0000000,0.0000000,0.0000000); //object(funboxtop1) (1)
      CreateObject(18783,-479.7189941,-2590.4580078,1482.6490479,0.0000000,18.0000000,90.0000000); //object(funboxtop1) (2)
      CreateObject(18783,-479.5790100,-2574.5029297,1480.7430420,0.0000000,0.0000000,0.0000000); //object(funboxtop1) (3)
      CreateObject(8494,-466.5469971,-2550.7189941,1483.5429688,0.0000000,0.0000000,179.9945068); //object(lowbuild01_lvs) (1)
      CreateObject(1536,-491.6025391,-2567.8613281,1484.5389404,0.0000000,0.0000000,357.9949951); //object(gen_doorext15) (2)
      CreateObject(18783,-459.8649902,-2590.4528809,1482.6269531,0.0000000,17.9956055,90.0000000); //object(funboxtop1) (5)
      CreateObject(18783,-459.8750000,-2609.2041016,1485.5839844,0.0000000,0.0000000,0.0000000); //object(funboxtop1) (6)
      CreateObject(19381,-450.8089905,-2562.7338867,1488.7889404,0.0000000,0.0000000,7.9925537); //object(wall029) (2)
      CreateObject(1723,-453.1099854,-2597.7949219,1487.6400146,0.0000000,0.0000000,179.9999390); //object(mrk_seating1) (1)
      CreateObject(1723,-456.8229980,-2597.7709961,1487.6330566,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (2)
      CreateObject(1723,-460.3640137,-2597.7739258,1487.6340332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (3)
      CreateObject(1723,-466.5150146,-2597.7500000,1487.6259766,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (4)
      CreateObject(1723,-470.0499878,-2597.7041016,1487.6319580,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (5)
      CreateObject(1723,-475.2839966,-2597.7338867,1487.6440430,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (6)
      CreateObject(1723,-478.9190063,-2597.7548828,1487.6490479,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (7)
      CreateObject(1723,-482.4819946,-2597.7351074,1487.6419678,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (8)
      CreateObject(1723,-453.0140076,-2595.3830566,1486.8570557,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (9)
      CreateObject(1723,-456.8439941,-2595.4040527,1486.8640137,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (10)
      CreateObject(1723,-460.4570007,-2595.4199219,1486.8690186,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (11)
      CreateObject(1723,-466.5339966,-2595.4470215,1486.8780518,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (12)
      CreateObject(1723,-470.0539856,-2595.4360352,1486.8950195,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (13)
      CreateObject(1723,-475.3110046,-2595.4289551,1486.8929443,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (14)
      CreateObject(1723,-478.9530029,-2595.4279785,1486.8929443,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (15)
      CreateObject(1723,-482.6170044,-2595.4689941,1486.9060059,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (16)
      CreateObject(1723,-452.9830017,-2593.2329102,1486.1590576,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (17)
      CreateObject(1723,-460.4320068,-2593.2758789,1486.1729736,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (18)
      CreateObject(1723,-456.7650146,-2593.2849121,1486.1750488,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (19)
      CreateObject(1723,-466.5859985,-2593.1899414,1486.1450195,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (20)
      CreateObject(1723,-470.1470032,-2593.1721191,1486.1600342,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (22)
      CreateObject(1723,-475.2650146,-2593.4240723,1486.2380371,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (23)
      CreateObject(1723,-478.9750061,-2593.4418945,1486.2469482,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (24)
      CreateObject(1723,-482.6019897,-2593.4870605,1486.2619629,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (25)
      CreateObject(1723,-452.9450073,-2591.1589355,1485.4849854,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (26)
      CreateObject(1723,-456.7640076,-2591.1740723,1485.4899902,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (27)
      CreateObject(1723,-460.4129944,-2591.1779785,1485.4909668,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (28)
      CreateObject(1723,-466.5960083,-2591.1320801,1485.4759521,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (29)
      CreateObject(1723,-470.1919861,-2591.1049805,1485.4880371,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (30)
      CreateObject(1723,-475.2650146,-2591.1469727,1485.5019531,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (31)
      CreateObject(1723,-478.8739929,-2591.1369629,1485.4980469,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (32)
      CreateObject(1723,-482.5509949,-2591.1330566,1485.4969482,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (33)
      CreateObject(1723,-452.8989868,-2588.9318848,1484.7619629,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (34)
      CreateObject(1723,-456.6489868,-2588.9770508,1484.7760010,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (35)
      CreateObject(1723,-460.3210144,-2588.9450684,1484.7659912,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (36)
      CreateObject(1723,-466.5929871,-2588.9829102,1484.7779541,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (37)
      CreateObject(1723,-470.1709900,-2588.9929199,1484.8020020,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (38)
      CreateObject(1723,-475.1884766,-2588.9648438,1484.7929688,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (39)
      CreateObject(1723,-478.8949890,-2588.9650879,1484.7929688,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (40)
      CreateObject(1723,-482.4760132,-2588.9660645,1484.7929688,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (41)
      CreateObject(1723,-452.9179993,-2586.7919922,1484.0660400,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (42)
      CreateObject(1723,-456.6990051,-2586.8459473,1484.0839844,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (43)
      CreateObject(1723,-460.2909851,-2586.8149414,1484.0739746,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (44)
      CreateObject(1723,-466.6549988,-2586.8349609,1484.0799561,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (45)
      CreateObject(1723,-470.2179871,-2586.8239746,1484.0970459,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (46)
      CreateObject(1723,-475.1679993,-2586.8068848,1484.0909424,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (47)
      CreateObject(1723,-478.8810120,-2586.8859863,1484.1169434,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (48)
      CreateObject(1723,-482.4769897,-2586.8869629,1484.1169434,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (49)
      CreateObject(1723,-452.8519897,-2584.3129883,1483.2609863,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (50)
      CreateObject(1723,-456.6270142,-2584.2810059,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (54)
      CreateObject(1723,-460.2799988,-2584.2929688,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (55)
      CreateObject(1723,-466.7980042,-2584.4108887,1483.2929688,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (56)
      CreateObject(1723,-470.2470093,-2584.3569336,1483.2950439,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (57)
      CreateObject(1723,-475.1799927,-2584.2929688,1483.2750244,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (58)
      CreateObject(1723,-478.8670044,-2584.2790527,1483.2700195,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (59)
      CreateObject(1723,-482.5629883,-2584.2858887,1483.2719727,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (60)
      CreateObject(1723,-452.8380127,-2581.5009766,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (61)
      CreateObject(1723,-456.5599976,-2581.6430664,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (62)
      CreateObject(1723,-460.1570129,-2581.6269531,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (63)
      CreateObject(1723,-466.8129883,-2581.6760254,1483.2590332,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (64)
      CreateObject(1723,-470.2380066,-2581.7570801,1483.2430420,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (65)
      CreateObject(1723,-475.1359863,-2581.7629395,1483.2430420,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (66)
      CreateObject(1723,-478.8439941,-2581.8449707,1483.2430420,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (67)
      CreateObject(1723,-482.5320129,-2581.8320312,1483.2430420,0.0000000,0.0000000,179.9945068); //object(mrk_seating1) (68)
      CreateObject(1536,-464.9750061,-2612.1508789,1488.0839844,0.0000000,0.0000000,0.0000000); //object(gen_doorext15) (1)
      CreateObject(1536,-476.5130005,-2612.1660156,1488.1059570,0.0000000,0.0000000,0.0000000); //object(gen_doorext15) (3)
      CreateObject(3084,-458.0190125,-2569.2189941,1492.5959473,28.0000000,0.0000000,0.0000000); //object(trdcsgrgdoor_lvs) (3)
      CreateObject(3084,-470.4658203,-2569.2021484,1492.5939941,27.9986572,0.0000000,0.0000000); //object(trdcsgrgdoor_lvs) (4)
      CreateObject(3084,-482.9179993,-2569.1950684,1492.6140137,27.9986572,0.0000000,0.0000000); //object(trdcsgrgdoor_lvs) (5)
      CreateObject(3084,-445.5790100,-2569.2128906,1492.5799561,27.9986572,0.0000000,0.0000000); //object(trdcsgrgdoor_lvs) (6)
      CreateObject(1472,-493.8750000,-2565.3120117,1483.5729980,0.0000000,0.0000000,269.9999695); //object(dyn_porch_1) (1)
      CreateObject(1536,-492.6159973,-2566.0991211,1483.9329834,0.0000000,0.0000000,89.9949951); //object(gen_doorext15) (2)
      CreateObject(2297,-493.0960083,-2559.5969238,1482.9730225,0.0000000,0.0000000,225.9999695); //object(tv_unit_2) (1)
      CreateObject(2232,-488.4869995,-2570.6589355,1483.8409424,0.0000000,0.0000000,0.0000000); //object(med_speaker_4) (1)
      CreateObject(2232,-487.7879944,-2570.6589355,1483.8409424,0.0000000,0.0000000,0.0000000); //object(med_speaker_4) (2)
      CreateObject(2232,-450.8630066,-2570.6379395,1483.8570557,0.0000000,0.0000000,0.0000000); //object(med_speaker_4) (3)
      CreateObject(2232,-451.5700073,-2570.6350098,1483.8570557,0.0000000,0.0000000,0.0000000); //object(med_speaker_4) (4)
      CreateObject(2229,-449.8519897,-2583.6440430,1489.0090332,0.0000000,0.0000000,326.0000000); //object(swank_speaker) (1)
      CreateObject(2229,-488.8569946,-2584.4780273,1489.2430420,0.0000000,0.0000000,41.9968567); //object(swank_speaker) (2)
      CreateObject(19149,-454.8360107,-2569.4331055,1492.7540283,0.0000000,0.0000000,176.0000000); //object(pinspotlight7) (2)
      CreateObject(19149,-461.0360107,-2569.4331055,1492.7540283,0.0000000,0.0000000,176.0000000); //object(pinspotlight7) (2)
      CreateObject(19149,-467.4070129,-2569.3879395,1492.7619629,0.0000000,0.0000000,174.0000000); //object(pinspotlight7) (1)
      CreateObject(19149,-473.5750122,-2569.3640137,1492.7619629,0.0000000,0.0000000,185.9999847); //object(pinspotlight7) (3)
      CreateObject(19149,-479.7750122,-2569.3640137,1492.7619629,0.0000000,0.0000000,185.9999847); //object(pinspotlight7) (3)
      CreateObject(19149,-485.9750122,-2569.3640137,1492.7619629,0.0000000,0.0000000,185.9999847); //object(pinspotlight7) (3)
      CreateObject(1536,-492.7619934,-2597.4230957,1482.9460449,0.0000000,0.0000000,270.0000000); //object(gen_doorext15) (3)
      CreateObject(1536,-492.7669983,-2590.1799316,1482.9279785,0.0000000,0.0000000,269.9945068); //object(gen_doorext15) (3)
      CreateObject(3935,-493.6279907,-2586.0319824,1484.2490234,0.0000000,0.0000000,0.0000000); //object(statue) (1)
      CreateObject(1723,-493.7699890,-2581.6030273,1482.9909668,0.0000000,0.0000000,269.9945068); //object(mrk_seating1) (39)
      CreateObject(3935,-493.7229919,-2579.1770020,1484.2609863,0.0000000,0.0000000,0.0000000); //object(statue) (2)
      CreateObject(1569,-507.5979919,-2606.0290527,1483.0479736,0.0000000,0.0000000,0.0000000); //object(adam_v_door) (1)
      CreateObject(1557,-509.8989868,-2596.2900391,1482.9659424,0.0000000,0.0000000,272.0000000); //object(gen_doorext19) (1)
      CreateObject(1557,-509.7959900,-2599.2980957,1482.9720459,0.0000000,0.0000000,91.9995117); //object(gen_doorext19) (2)
      CreateObject(16151,-508.6520081,-2586.2600098,1483.3079834,0.0000000,0.0000000,179.9999390); //object(ufo_bar) (1)
      CreateObject(2449,-507.6229858,-2579.0119629,1482.9539795,0.0000000,0.0000000,92.0000000); //object(cj_ff_conter_5e) (1)
      CreateObject(2449,-507.6619873,-2576.0190430,1483.0190430,0.0000000,0.0000000,91.9995117); //object(cj_ff_conter_5e) (2)
      CreateObject(2664,-505.6650085,-2568.5061035,1484.1450195,0.0000000,0.0000000,0.0000000); //object(cj_suburb_door) (1)
      CreateObject(2664,-504.0220032,-2567.4409180,1484.1269531,0.0000000,0.0000000,179.9999390); //object(cj_suburb_door) (2)


В public OnPlayerCommandText
Код
    if(!strcmp(cmd,"/tickets",true))
   {
          if(PlayerToPoint(1.5,playerid,-502.7257,-2605.6863,1483.9840) || PlayerToPoint(1.5,playerid,-499.6479,-2605.7080,1483.9840))
    {
        if(ticketprice == 0) return SendClientMessage(playerid,0xFF0000AA,"Касса не работает.");
        new string[35];
        format(string,sizeof(string),"Вы хотите купить билет за %d$",ticketprice);
        ShowPlayerDialog(playerid,1003,DIALOG_STYLE_MSGBOX  ,"Касса",string,"Да","Нет");
        return 1;
    }
    else return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Вы должны находится возле кассы концертного зала.");
   }
   if(!strcmp(cmd,"/hpanel",true))
   {
          if(PlayerInfo[playerid][pAdmin] >= 5)
    {
                          if(eurostart == true) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Нельзя управлять концертным залом во время евровиденья.");
     ShowPlayerDialog(playerid,1001,DIALOG_STYLE_LIST,"Концертный зал","Установить вход в зал по билетам/свободный\nВключить/Выключить музыку в концертном зале\nПоднять/Опустить занавес\nФон сцены №1\nФон сцены №2\nФон сцены №3\nФон сцены №4\nФон сцены №5","Далее","Отмена");
     return 1;
    }
    else return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Вы не работник концертного зала.");
   }
   if(!strcmp(cmd,"/giveskip",true))
   {
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid,0xCCCCCCAA,"Используйте: /giveskip [ID]");
           new id = strval(tmp);
          if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Игрок с таким ID не найден.");
                  new Float:x, Float:y, Float:z;
                  GetPlayerPos(playerid, x, y, z);
        if(!PlayerToPoint(3.0,playerid,x, y, z) || GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(id)) return SendClientMessage(playerid,0xCCCCCCAA,"Данный игрок находится слишком далеко от вас.");
        propusk[id] = true;
        SendClientMessage(playerid,0x33AA33AA,"Вы выдали пропуск за кулисы.");
       }
    return 1;
   }
          if(!strcmp(cmd,"/dropticket",true))
   {
        if(ticket[playerid] == false) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} У вас нет билета.");
    ticket[playerid] = false;
       SendClientMessage(playerid,0xFF0000AA,"Вы выкинули свой билет.");
    return 1;
   }


В конец паблика OnPlayerPickUpPickup
Код
    else if(pickupid == hallpick[0])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerPos(playerid,-507.2059,-2597.7146,1483.9840);
    SetPlayerFacingAngle(playerid,268.6845);
   }
   else if(pickupid == hallpick[1])
   {
    SetPlayerInterior(playerid,0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid,1122.8240,-1130.7513,23.8111);
    SetPlayerFacingAngle(playerid,178.4671);
   }
   else if(pickupid == hallpick[2])
   {
    if(ticketprice > 0)
    {
              if(ticket[playerid] == false || PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,0xFF0000AA,"Вход в концертный зал только по билетам, купите билет в кассе.");
    }
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 3);
    SetPlayerPos(playerid,-464.1473,-2608.9250,1489.0840);
    SetPlayerFacingAngle(playerid,3.9855);
    if(musichall == true)
    {
              StopAudioStreamForPlayer(playerid);
              PlayAudioStreamForPlayer(playerid,urlaudiostrhall, -470.1566,-2566.8118,1485.5391, 50.0,true);
              audiostr[playerid] = true;
    }
   }
   else if(pickupid == hallpick[3])
   {
          if(ticketprice > 0)
    {
              if(ticket[playerid] == false || PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,0xFF0000AA,"Вход в концертный зал только по билетам, купите билет в кассе.");
    }
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 3);
    SetPlayerPos(playerid,-475.5012,-2608.4438,1489.1060);
    SetPlayerFacingAngle(playerid,358.6588);
    if(musichall == true)
    {
              StopAudioStreamForPlayer(playerid);
              PlayAudioStreamForPlayer(playerid,urlaudiostrhall, -470.1566,-2566.8118,1485.5391, 50.0,true);
              audiostr[playerid] = true;
    }
   }
   else if(pickupid == hallpick[4])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerPos(playerid,-494.9509,-2598.1763,1483.9840);
    SetPlayerFacingAngle(playerid,86.0563);
    if(audiostr[playerid] == true)
    {
              StopAudioStreamForPlayer(playerid);
              audiostr[playerid] = false;
    }
   }
   else if(pickupid == hallpick[5])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerPos(playerid,-495.0016,-2590.9041,1483.9840);
    SetPlayerFacingAngle(playerid,86.3696);
    if(audiostr[playerid] == true)
    {
              StopAudioStreamForPlayer(playerid);
              audiostr[playerid] = false;
    }
   }
   else if(pickupid == hallpick[6])
   {
    if(PlayerInfo[playerid][pAdmin] >= 5 || propusk[playerid] == true)
    {
     SetPlayerInterior(playerid,1);
     SetPlayerVirtualWorld(playerid, 2);
        SetPlayerPos(playerid,-504.7797,-2565.2566,1483.9840);
     SetPlayerFacingAngle(playerid,356.1518);
    }
    else return SendClientMessage(playerid,0xFF0000AA,"Вы не работник концертного зала/у вас нет пропуска.");
   }
   else if(pickupid == hallpick[7])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 1);
    SetPlayerPos(playerid,-504.9547,-2570.9827,1483.9840);
    SetPlayerFacingAngle(playerid,175.6701);
   }
   else if(pickupid == hallpick[8])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 3);
    SetPlayerPos(playerid,-490.8388,-2565.0894,1485.5391);
    SetPlayerFacingAngle(playerid,359.1169);
   }
   else if(pickupid == hallpick[9])
   {
    SetPlayerInterior(playerid,1);
    SetPlayerVirtualWorld(playerid, 2);
    SetPlayerPos(playerid,-495.5245,-2565.2810,1483.9840);
    SetPlayerFacingAngle(playerid,87.1643);
   }
   else if(pickupid == hallpick[10])
   {
    if(ticketprice == 0) return SendClientMessage(playerid,0xFF0000AA,"Касса не работает.");
    new string[35];
    format(string,sizeof(string),"Вы хотите купить билет за %d$",ticketprice);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_MSGBOX  ,"Касса",string,"Да","Нет");
   }
   else if(pickupid == hallpick[11])
   {
          if(ticketprice == 0) return SendClientMessage(playerid,0xFF0000AA,"Касса не работает.");
          new string[35];
    format(string,sizeof(string),"Вы хотите купить билет за %d$",ticketprice);
    ShowPlayerDialog(playerid,1003,DIALOG_STYLE_MSGBOX  ,"Касса",string,"Да","Нет");
   }


В public OnDialogResponse
Код
case 1001:
          {
              if(response)
     {
                  switch(listitem)
                  {
       case 0:
       {
        if(ticketprice == 0)
        {
                    ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Концертный зал | Билеты","Введите цену за билет.","Далее","Отмена");
        }
        else if(ticketprice > 0) ticketprice = 0, SendClientMessage(playerid,0x33AA33AA,"Вы установили свободный вход.");
       }
       case 1:
       {
        if(musichall == false)
        {
                    ShowPlayerDialog(playerid,1004,DIALOG_STYLE_INPUT,"Концертный зал | Музыка","Введите прямую ссылку на аудио поток.","Далее","Отмена");
        }
        else if(musichall == true)
        {
            musichall = false;
            for(new i=0; i<GetMaxPlayers(); i++)
                    {
                     if(audiostr[i] == true)
                     {
                     StopAudioStreamForPlayer(i);
                     audiostr[i] = false;
                     }
                    }
            SendClientMessage(playerid,0xFF0000AA,"Вы отключили музыку.");
        }
       }
       case 2:
       {
        if(statzanaves == false)
        {
                    MoveObject(zanaves[0],-477.8515625,-2567.9114062,1498.2590332, 2);
                    MoveObject(zanaves[1],-455.4511719,-2567.9184766,1498.2590332, 2);
                    statzanaves = true;
        }
        else if(statzanaves == true)
        {
                    MoveObject(zanaves[0],-477.8515625,-2567.9114062,1491.2590332, 2);
                    MoveObject(zanaves[1],-455.4511719,-2567.9184766,1491.2590332, 2);
                    statzanaves = false;
        }
       }
                     case 3: SetObjectMaterial(fonhall,0,19129,"dancefloors","DanceFloor1",0);
       case 4: SetObjectMaterial(fonhall,0,14623,"mafcasmain","casino_carp",0);
       case 5: SetObjectMaterial(fonhall,0,18028,"cj_bar2","GB_nastybar03",0);
       case 6: SetObjectMaterial(fonhall,0,18018,"genintintbarb","GB_midbar01",0);
       case 7: SetObjectMaterial(fonhall,0,13007,"sw_bankint","woodfloor1",0);
                  }
     }
     else if(!response) return 1;
    }
    case 1002:
          {
              if(response)
     {
                  if(!strlen(inputtext)) return ShowPlayerDialog(playerid,1002,DIALOG_STYLE_INPUT,"Концертный зал | Билеты","Введите цену за билет.","Далее","Отмена");
      if(strval(inputtext) < 1 || strval(inputtext) > 25000) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Цена билета не может быть меньше 1$ и больше 25000$.");
                  ticketprice = strval(inputtext);
      new string[55];
                  format(string,sizeof(string),"Вы установили вход по билетам, цена билета: %d$",strval(inputtext));
      SendClientMessage(playerid,0x33AA33AA,string);
     }
     else if(!response) return 1;
    }
    case 1003:
          {
              if(response)
     {
                  if(ticketprice == 0) return SendClientMessage(playerid,0xFF0000AA,"Касса не работает.");
      if(ticket[playerid] == true) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} У вас уже есть билет.");
      if(PlayerInfo[playerid][pCash] < ticketprice) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} У вас недостаточно денег.");
      PlayerInfo[playerid][pCash] -= ticketprice;
      ticket[playerid] = true;
      SendClientMessage(playerid,0x33AA33AA,"Вы купили билет.");
     }
     else if(!response) return 1;
    }
    case 1004:
          {
              if(response)
     {
      if(strlen(inputtext) > 400) return SendClientMessage(playerid,0xFFFFFFFF,"{FF0000}x{FFFFFF} Длина ссылки на аудио поток не должна превышать 400 символов.");
         strmid(urlaudiostrhall, inputtext, 0, strlen(inputtext), 400);
      musichall = true;
      for(new i=0; i<GetMaxPlayers(); i++)
                  {
                      if(PlayerToPoint(50.0,playerid,-470.1566,-2566.8118,1485.5391) && GetPlayerVirtualWorld(i) == 3)
                      {
                          StopAudioStreamForPlayer(i);
                          PlayAudioStreamForPlayer(i,inputtext, -470.1566,-2566.8118,1485.5391, 50.0,true);
                          audiostr[i] = true;
                   }
                  }
      SendClientMessage(playerid,0x33AA33AA,"Вы включили музыку.");
     }
     else if(!response) return 1;
    }



Автор: HDD


Сообщение отредактировал HDD - Среда, 20.08.2014, 11:54
Типок Дата: Суббота, 25.10.2014, 06:27 | Сообщение # 2
Новичок
Сообщений: 29
Статус: Offline
Очень даже ничего,взял себе.
[CM]PizDec Дата: Суббота, 04.07.2015, 10:16 | Сообщение # 3
Новичок
Сообщений: 7
Статус: Offline
Кривой
Jamiraque[t0wer] Дата: Воскресенье, 12.07.2015, 23:10 | Сообщение # 4
Советник
Сообщений: 603
Статус: Offline
есть нормальная версия данной разработки в паблик моде
Good[CM]Stark Дата: Воскресенье, 19.07.2015, 01:11 | Сообщение # 5
Любитель
Сообщений: 44
Статус: Offline
Автор молочина
Vaners123 Дата: Воскресенье, 19.07.2015, 01:17 | Сообщение # 6
Новичок
Сообщений: 22
Статус: Offline
Не уютно как-то все однообразное, а так за работу и старание молодец
CM[Magister] Дата: Четверг, 23.07.2015, 03:35 | Сообщение # 7
Советник
Сообщений: 669
Статус: Offline
За старание + поставил.

ПО ПОВОДУ МОИХ ФЕЙКОВ!
Я не Василий или кто-то другой!
НИЧЕГО НЕ ПРОДАЮ И НЕ ПОКУПАЮ! ВООБЩЕ!!!
ВСЕ КТО ЧТО-ТО ПРОДАЁТ И ПОКУПАЕТ ОТ МОЕГО ИМЕНИ — МОШЕННИКИ!!!
Len1n Дата: Четверг, 23.07.2015, 10:43 | Сообщение # 8
Боец
Сообщений: 89
Статус: Offline
Интересная работа, пару штрихов и будет прекрасно!

Связь со мной:
Skype: po61-rap
E-Mail: len1nthe@gmail.com

if(time>=1500 && rep<500) {
cout « "200 репы накручено!";
rep+=200;
}
Zadrot™ Дата: Четверг, 23.07.2015, 21:01 | Сообщение # 9
Боец
Сообщений: 210
Статус: Offline
Нормально так

10.06.2014 - ✖✖✖
Амасинк Дата: Четверг, 23.07.2015, 23:50 | Сообщение # 10
Боец
Сообщений: 267
Статус: Offline
Зачем так много пикапов? Вход, выход сделать, да и всё + панель управления.. Как по мне - много лишнего кода.

Помогаю новичкам в pawn
Картёжник Дата: Пятница, 24.07.2015, 00:30 | Сообщение # 11
Новичок
Сообщений: 13
Статус: Offline
Полезно, возьму себе
sergey665605 Дата: Воскресенье, 05.06.2016, 18:22 | Сообщение # 12
Новичок
Сообщений: 16
Статус: Offline
Хорошо было-бы и команды на DC_CMD, но можно легко перевести, +
Air_Dron Дата: Четверг, 16.06.2016, 09:52 | Сообщение # 13
Любитель
Сообщений: 39
Статус: Offline
Годнота возьму себе )
Danny_Marcelo Дата: Воскресенье, 04.09.2016, 16:26 | Сообщение # 14
Боец
Сообщений: 282
Статус: Offline
Годно
  • Страница 1 из 1
  • 1
Поиск:
Статистика Форума