Guest User

Untitled

a guest
Jul 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.32 KB | None | 0 0
  1. #define BIJELA "{FFFFFF}"
  2. #define SVJETLO_PLAVA "{00C0FF}"
  3. #define ZELENA "{6EF83C}"
  4. #define CRVENA "{F81414}"
  5.  
  6. // ONGAMEMODEINIT
  7.  
  8. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1514.7094,-1170.0706,24.0781,15,0);
  9. AddStaticPickup(1239,1,1514.7094,-1170.0706,24.0781,-1);
  10. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1211.3483,-1294.0812,13.5460,15,0);
  11. AddStaticPickup(1239,1,1211.3483,-1294.0812,13.5460,-1);
  12. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1693.9229,-1873.2701,13.5433,15,0);
  13. AddStaticPickup(1239,1,1693.9229,-1873.2701,13.5433,-1);
  14. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1585.9122,-2298.0071,13.5396,15,0);
  15. AddStaticPickup(1239,1,1585.9122,-2298.0071,13.5396,-1);
  16. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1523.6334,-1717.7678,13.5469,15,0);
  17. AddStaticPickup(1239,1,1523.6334,-1717.7678,13.5469,-1);
  18. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1150.7058,-929.0897,42.8324,15,0);
  19. AddStaticPickup(1239,1,1150.7058,-929.0897,42.8324,-1);
  20. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1693.9229,-1873.2701,13.5433,15,0);
  21. AddStaticPickup(1239,1,1693.9229,-1873.2701,13.5433,-1);
  22. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,1468.5887,-1042.8698,23.4549,15,0);
  23. AddStaticPickup(1239,1,1468.5887,-1042.8698,23.4549,-1);
  24. Create3DTextLabel(""SVJETLO_PLAVA"[KIOSK]"BIJELA"\n/kiosk",-1,2163.5742,-1112.4379,25.0856,15,0);
  25. AddStaticPickup(1239,1,2163.5742,-1112.4379,25.0856,-1);
  26. // 8 KIOSKA
  27. CreateDynamicObject(1571, 1468.3203125, -1045.326171875, 24, 0, 0, 179.99450683594);
  28. CreateDynamicObject(1570, 1509.4069824219, -1172.248046875, 24.409250259399, 0, 0, 180);
  29. CreateDynamicObject(955, 1517.716796875, -1171.8753662109, 23.378124237061, 0, 0, 180);
  30. CreateDynamicObject(1533, 1466.2846679688, -1044.8905029297, 22.828125, 0, 0, 270);
  31. CreateDynamicObject(1533, 1466.3171386719, -1046.4632568359, 22.828125, 0, 0, 89.25);
  32. CreateDynamicObject(1981, 1466.9229736328, -1046.3980712891, 22.828125, 0, 0, 180);
  33. CreateDynamicObject(1981, 1467.9019775391, -1046.4058837891, 22.828125, 0, 0, 179.99450683594);
  34. CreateDynamicObject(1981, 1468.8773193359, -1046.4100341797, 22.828125, 0, 0, 179.99450683594);
  35. CreateDynamicObject(1981, 1516.0887451172, -1173.3592529297, 23.078125, 0, 0, 179.99450683594);
  36. CreateDynamicObject(1984, 1467.2470703125, -1044.767578125, 22.828125, 0, 0, 0);
  37. CreateDynamicObject(1356, 1463.1632080078, -1045.2580566406, 23.839370727539, 337.001953125, 0, 0);
  38. CreateDynamicObject(1356, 1462.0357666016, -1045.2010498047, 23.839370727539, 337.00012207031, 0, 0);
  39. CreateDynamicObject(1571, 1515.0174560547, -1172.251953125, 24.258941650391, 0, 0, 179.99450683594);
  40. CreateDynamicObject(955, 1471.044921875, -1044.689453125, 23.22812461853, 0, 0, 179.99450683594);
  41. CreateDynamicObject(1981, 1515.1079101563, -1173.3630371094, 23.078125, 0, 0, 179.99450683594);
  42. CreateDynamicObject(1981, 1514.126953125, -1173.3662109375, 23.078125, 0, 0, 179.99450683594);
  43. CreateDynamicObject(1981, 1513.5751953125, -1173.3751220703, 23.078125, 0, 0, 179.99450683594);
  44. CreateDynamicObject(955, 1471.044921875, -1044.689453125, 23.22812461853, 0, 0, 179.99450683594);
  45. CreateDynamicObject(1570, 1462.1142578125, -1045.4794921875, 24.159250259399, 0, 0, 179.99450683594);
  46. CreateDynamicObject(1356, 1510.3294677734, -1171.9111328125, 24.026641845703, 337.00012207031, 0, 0);
  47. CreateDynamicObject(1356, 1509.265625, -1171.884765625, 24.012317657471, 337.00012207031, 0, 0);
  48. CreateDynamicObject(1533, 1512.9910888672, -1171.8447265625, 23.078125, 0, 0, 270);
  49. CreateDynamicObject(1533, 1513.1044921875, -1173.3472900391, 23.078125, 0, 0, 90);
  50. CreateDynamicObject(1984, 1514.0222167969, -1171.7028808594, 23.078125, 0, 0, 0);
  51. CreateDynamicObject(1571, 1146.8364257813, -929.68994140625, 43.381008148193, 0, 0, 89.994506835938);
  52. CreateDynamicObject(1570, 1146.4875488281, -923.43737792969, 43.483295440674, 0, 0, 89.994506835938);
  53. CreateDynamicObject(1356, 1146.8952636719, -924.52557373047, 43.062164306641, 337.00012207031, 0, 270);
  54. CreateDynamicObject(1356, 1146.9067382813, -923.46179199219, 43.055995941162, 337.00012207031, 0, 270);
  55. CreateDynamicObject(955, 1147.5620117188, -932.11376953125, 42.391181945801, 0, 0, 89.994506835938);
  56. CreateDynamicObject(1533, 1147.2408447266, -927.64654541016, 42.184326171875, 0, 0, 180);
  57. CreateDynamicObject(1533, 1145.7781982422, -927.81573486328, 42.184326171875, 0, 0, 359.99450683594);
  58. CreateDynamicObject(1981, 1145.6768798828, -928.29205322266, 42.203125, 0, 0, 89.994506835938);
  59. CreateDynamicObject(1981, 1145.6680908203, -929.24401855469, 42.203125, 0, 0, 89.994506835938);
  60. CreateDynamicObject(1981, 1145.6654052734, -930.17095947266, 42.203125, 0, 0, 89.994506835938);
  61. CreateDynamicObject(1981, 1145.6639404297, -930.68634033203, 42.203125, 0, 0, 89.994506835938);
  62. CreateDynamicObject(1984, 1147.3947753906, -928.47650146484, 42.203125, 0, 0, 270);
  63. CreateDynamicObject(1571, 1693.7998046875, -1876.0087890625, 13.733626365662, 0, 0, 179.99450683594);
  64. CreateDynamicObject(1571, 1589.126953125, -2298.662109375, 13.724383354187, 0, 0, 269.98901367188);
  65. CreateDynamicObject(1571, 1213.6357421875, -1294.068359375, 13.736805915833, 0, 0, 269.98901367188);
  66. CreateDynamicObject(1571, 2164.2658691406, -1109.6489257813, 25.736030578613, 0, 0, 351.98901367188);
  67. CreateDynamicObject(1571, 1521.4453125, -1718.0234375, 13.727691650391, 0, 0, 89.901123046875);
  68. CreateDynamicObject(955, 1696.2534179688, -1875.3365478516, 12.85179901123, 0, 0, 180);
  69. CreateDynamicObject(955, 1522.1318359375, -1720.5078125, 12.796875, 0, 0, 90);
  70. CreateDynamicObject(955, 1588.4459228516, -2296.1579589844, 12.834250450134, 0, 0, 269.99450683594);
  71. CreateDynamicObject(955, 1213.3110351563, -1291.494140625, 12.844104766846, 0, 0, 269.98901367188);
  72. CreateDynamicObject(1570, 1212.6434326172, -1301.2108154297, 13.882349014282, 0, 0, 89.994506835938);
  73. CreateDynamicObject(955, 2161.5544433594, -1110.0541992188, 24.849815368652, 0, 0, 0);
  74. CreateDynamicObject(1570, 2172.236328125, -1111.2177734375, 25.836847305298, 0, 0, 349.99145507813);
  75. CreateDynamicObject(1570, 1521.83203125, -1710.833984375, 13.878001213074, 0, 0, 89.994506835938);
  76. CreateDynamicObject(1570, 1687.6436767578, -1875.6416015625, 13.866619110107, 0, 0, 179.99450683594);
  77. CreateDynamicObject(1533, 1521.9309082031, -1715.9841308594, 12.546875, 0, 0, 180.75);
  78. CreateDynamicObject(1533, 1691.7434082031, -1875.6878662109, 12.528702735901, 0, 0, 270.7470703125);
  79. CreateDynamicObject(1533, 1520.3447265625, -1716.1162109375, 12.546875, 0, 0, 0.7415771484375);
  80. CreateDynamicObject(1533, 1213.2788085938, -1296.06640625, 12.54775428772, 0, 0, 358.7470703125);
  81. CreateDynamicObject(1533, 1588.8056640625, -2300.697265625, 12.534555435181, 0, 0, 358.74206542969);
  82. CreateDynamicObject(1533, 2166.21875, -1110.3232421875, 24.397556304932, 0, 0, 80.491333007813);
  83. CreateDynamicObject(1984, 1588.6403808594, -2299.763671875, 12.535584449768, 0, 0, 90.5);
  84. CreateDynamicObject(1984, 2165.2880859375, -1110.33984375, 24.500991821289, 0, 0, 171.99645996094);
  85. CreateDynamicObject(1984, 1213.0703125, -1295.4052734375, 12.381391525269, 0, 0, 90.499877929688);
  86. CreateDynamicObject(1984, 1692.8979492188, -1875.4554443359, 12.537113189697, 0, 0, 0.4998779296875);
  87. CreateDynamicObject(1984, 1521.9731445313, -1716.9700927734, 12.546875, 0, 0, 270.49987792969);
  88. CreateDynamicObject(1981, 1520.2756347656, -1716.5832519531, 12.3828125, 0, 0, 89.994506835938);
  89. CreateDynamicObject(1981, 1520.2836914063, -1717.5255126953, 12.3828125, 0, 0, 89.994506835938);
  90. CreateDynamicObject(1981, 1520.2877197266, -1718.4284667969, 12.3828125, 0, 0, 89.994506835938);
  91. CreateDynamicObject(1981, 1520.2946777344, -1719.2088623047, 12.3828125, 0, 0, 89.994506835938);
  92. CreateDynamicObject(1981, 1694.8264160156, -1877.1359863281, 12.54524230957, 0, 0, 179.99450683594);
  93. CreateDynamicObject(1981, 1693.9222412109, -1877.1379394531, 12.54524230957, 0, 0, 179.99450683594);
  94. CreateDynamicObject(1981, 1693.0607910156, -1877.1369628906, 12.54524230957, 0, 0, 179.99450683594);
  95. CreateDynamicObject(1981, 1692.3558349609, -1877.1419677734, 12.54524230957, 0, 0, 179.99450683594);
  96. CreateDynamicObject(1981, 1590.2489013672, -2297.5295410156, 12.539621353149, 0, 0, 269.99450683594);
  97. CreateDynamicObject(1981, 1590.2464599609, -2298.388671875, 12.539621353149, 0, 0, 269.98901367188);
  98. CreateDynamicObject(1981, 1590.248046875, -2298.9467773438, 12.539621353149, 0, 0, 269.98901367188);
  99. CreateDynamicObject(1981, 1590.2379150391, -2300.1037597656, 12.539621353149, 0, 0, 269.98901367188);
  100. CreateDynamicObject(1981, 2163.2412109375, -1108.4040527344, 24.50722694397, 0, 0, 350.48901367188);
  101. CreateDynamicObject(1981, 1590.2395019531, -2299.5739746094, 12.539621353149, 0, 0, 269.98901367188);
  102. CreateDynamicObject(1981, 2164.2143554688, -1108.5603027344, 24.50722694397, 0, 0, 350.48583984375);
  103. CreateDynamicObject(1981, 2165.1899414063, -1108.7214355469, 24.50722694397, 0, 0, 350.48583984375);
  104. CreateDynamicObject(1981, 2165.8852539063, -1108.83984375, 24.50722694397, 0, 0, 350.48583984375);
  105.  
  106. /// ondialogresponse
  107. new playercash = GetPlayerMoney(playerid);
  108. if(dialogid == 1231)
  109. {
  110. switch(listitem)
  111. {
  112.  
  113. case 0: // UPALJAC
  114. {
  115. if(PlayerInfo[playerid][pUpaljac] == 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Vec imate jedan upaljac!");
  116. if(playercash < 10 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  117. PlayerInfo[playerid][pUpaljac] = 1;
  118. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste upaljac sada mozete pusiti cigare!");
  119. GivePlayerMoney(playerid, -10);
  120. }
  121. case 1: // CIGARE
  122. {
  123. if(playercash < 20 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  124. PlayerInfo[playerid][pCigare] += 20;
  125. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste kutiju cigareta u kojoj ima 20 komada! (/smoke)");
  126. GivePlayerMoney(playerid, -20);
  127. }
  128. case 2: // KONDOMI
  129. {
  130. if(playercash < 10 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  131. PlayerInfo[playerid][pKondom] += 3;
  132. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste kondome sada mozete imati siguran seks /safesex!");
  133. GivePlayerMoney(playerid, -10);
  134. }
  135. case 3: // GRICKALICE
  136. {
  137. if(playercash < 15 ) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  138. new Float:helti;
  139. GetPlayerHealth(playerid,helti);
  140. SetPlayerHealth(playerid, helti + 30);
  141. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste grickalice!");
  142. GivePlayerMoney(playerid, -15);
  143. }
  144. case 4: // SOK
  145. {
  146. new Float:health;
  147. new daj = GetPlayerHealth(playerid,health);
  148. if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  149. GivePlayerMoney(playerid, -10);
  150. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste sok!");
  151. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  152. new Float:helti;
  153. GetPlayerHealth(playerid,helti);
  154. SetPlayerHealth(playerid, helti + 15);
  155. }
  156. case 5: // BON OD 50
  157. {
  158. if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  159. GivePlayerMoney(playerid, -50);
  160. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste bon od 50$!");
  161. PlayerInfo[playerid][pBon] += 50;
  162. }
  163. case 6: // BON OD 100
  164. {
  165. if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFFFFF, ""CRVENA"ERROR: "ZELENA"Nemate dovoljno novca!");
  166. GivePlayerMoney(playerid, -100);
  167. SendClientMessage(playerid,-1,""CRVENA"KIOSK: "ZELENA"Kupili ste bon od 100$!");
  168. PlayerInfo[playerid][pBon] += 100;
  169. }
  170.  
  171. }
  172. return 1;
  173. }
  174.  
  175. CMD:kiosk(playerid,params[])
  176. {
  177. if(UBliziniKioska(playerid) && IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Niste u blizini kioska ili ste u autu.");
  178. ShowPlayerDialog(playerid, 1231, DIALOG_STYLE_LIST, "Kiosk", "Upaljac(10$)\nCigarte(20$)\nKondomi(10$)\nGrickalice(15$)\nSok(10$)\nBon od 50$(50$)\nBon od 100$(100$)", "Kupi", "Odustani");
  179. return true;
  180. }
  181.  
  182. CMD:smoke(playerid, params[])
  183. {
  184. if(PlayerInfo[playerid][pUpaljac] < 1) return SendClientMessage(playerid, -1, ""CRVENA"ERROR: "ZELENA"Nemate upaljac!");
  185. if(PlayerInfo[playerid][pCigare] < 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Nemate vise cigareta");
  186. if(PlayerInfo[playerid][pPusenje] == 1) return SendClientMessage(playerid,-1,""CRVENA"ERROR: "ZELENA"Vec pusite cigaretu!");
  187. PlayerInfo[playerid][pCigare] -= 1;
  188. PlayerInfo[playerid][pPusenje] = 1;
  189. SetPlayerSpecialAction(playerid,21);
  190. SendClientMessage(playerid, -1, ""ZELENA"Zapalili ste cigaretu ! "ZUTA"| Bacite je sa /ugasi");
  191. return true;
  192. }
  193.  
  194. CMD:ugasi(playerid, params[])
  195. {
  196. if(PlayerInfo[playerid][pPusenje] == 1)
  197. {
  198. PlayerInfo[playerid][pPusenje] = 0;
  199. SendClientMessage(playerid, -1, ""CRVENA"Bacili ste cigaretu!");
  200. SetPlayerSpecialAction(playerid,0);
  201. }
  202. return 1;
  203. }
  204.  
  205. // i na kraju callback
  206.  
  207. forward UBliziniKioska(playerid);
  208. public UBliziniKioska(playerid)
  209. {
  210. if(IsPlayerInRangeOfPoint(playerid, 2,1523.6334,-1717.7678,13.5469) || IsPlayerInRangeOfPoint(playerid, 2,1585.9122,-2298.0071,13.5396))
  211. {
  212. return 1;
  213. }
  214. else if(IsPlayerInRangeOfPoint(playerid, 2,1150.7058,-929.0897,42.8324) || IsPlayerInRangeOfPoint(playerid, 2,1211.2782,-1293.8723,13.5458))
  215. {
  216. return 1;
  217. }
  218. else if(IsPlayerInRangeOfPoint(playerid, 2,1693.9229,-1873.2701,13.5433) || IsPlayerInRangeOfPoint(playerid, 2,1468.5887,-1042.8698,23.4549))
  219. {
  220. return 1;
  221. }
  222. else if(IsPlayerInRangeOfPoint(playerid, 2,2163.5742,-1112.4379,25.0856) || IsPlayerInRangeOfPoint(playerid, 2,1514.7094,-1170.0706,24.0781))
  223. {
  224. return 1;
  225. }
  226. else if(IsPlayerInRangeOfPoint(playerid, 2,1211.3483,-1294.0812,13.5460))
  227. {
  228. return 1;
  229. }
  230. return 0;
  231. }
Add Comment
Please, Sign In to add comment