Guest User

Badnje veče by Terzic

a guest
Jan 6th, 2018
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.85 KB | None | 0 0
  1. #include < a_samp >
  2. #include < streamer >
  3. #include < zcmd >
  4.  
  5. #undef MAX_PLAYERS
  6. #define MAX_PLAYERS 50 // - Namestite kako je vama u gamemodu
  7.  
  8. #define PURPLE1 0xF9B7FFAA
  9. #define PURPLE2 0xE6A9ECAA
  10. #define PURPLE3 0xC38EC7AA
  11. #define PURPLE4 0xD2B9D3AA
  12. #define PURPLE5 0xC6AEC7AA
  13.  
  14. new vatra[21],
  15. Text3D:Labeli[2],
  16. badnje[52],
  17. badnjevece = 1;
  18.  
  19. public OnFilterScriptInit()
  20. {
  21. badnje[0] = CreateDynamicObjectEx(765, 1478.309204, -1703.975952, 13.349282, -1.600020, -2.899999, 168.328872, 300.00, 300.00);
  22. SetDynamicObjectMaterial(badnje[0], 0, -1, "none", "none", 0xFF663300);
  23. SetDynamicObjectMaterial(badnje[0], 1, 801, "gta_proc_ferns", "veg_bushred", 0xFF993300);
  24. badnje[1] = CreateDynamicObjectEx(765, 1478.521362, -1698.703247, 13.102470, 80.000000, 0.000000, 356.216888, 300.00, 300.00);
  25. SetDynamicObjectMaterial(badnje[1], 0, -1, "none", "none", 0xFF333333);
  26. SetDynamicObjectMaterial(badnje[1], 1, 801, "gta_proc_ferns", "veg_bushred", 0xFF663399);
  27. badnje[2] = CreateDynamicObjectEx(765, 1478.718994, -1706.464599, 10.262702, 38.499980, -4.000008, -163.761566, 300.00, 300.00);
  28. SetDynamicObjectMaterial(badnje[2], 0, -1, "none", "none", 0xFF663300);
  29. SetDynamicObjectMaterial(badnje[2], 1, 801, "gta_proc_ferns", "veg_bushred", 0x00000000);
  30. badnje[3] = CreateDynamicObjectEx(765, 1482.584472, -1706.557861, 12.836720, 80.000000, 0.000000, 243.815963, 300.00, 300.00);
  31. SetDynamicObjectMaterial(badnje[3], 0, -1, "none", "none", 0xFF663333);
  32. SetDynamicObjectMaterial(badnje[3], 1, 801, "gta_proc_ferns", "veg_bushred", 0xFF663300);
  33. badnje[4] = CreateDynamicObjectEx(765, 1481.920532, -1699.009887, 12.631679, 80.000000, 0.000000, 322.925567, 300.00, 300.00);
  34. SetDynamicObjectMaterial(badnje[4], 0, -1, "none", "none", 0xFF333333);
  35. SetDynamicObjectMaterial(badnje[4], 1, 801, "gta_proc_ferns", "veg_bushred", 0x00000000);
  36. badnje[5] = CreateDynamicObjectEx(765, 1475.618164, -1700.670288, 13.030099, 80.000000, 0.000000, 34.812400, 300.00, 300.00);
  37. SetDynamicObjectMaterial(badnje[5], 0, -1, "none", "none", 0xFF663333);
  38. SetDynamicObjectMaterial(badnje[5], 1, 801, "gta_proc_ferns", "veg_bushred", 0x00000000);
  39. badnje[6] = CreateDynamicObjectEx(765, 1474.563720, -1702.376220, 13.030099, 80.000000, 0.000000, 64.790206, 300.00, 300.00);
  40. SetDynamicObjectMaterial(badnje[6], 0, -1, "none", "none", 0xFF663366);
  41. SetDynamicObjectMaterial(badnje[6], 1, 801, "gta_proc_ferns", "veg_bushred", 0x00000000);
  42. badnje[7] = CreateDynamicObjectEx(765, 1483.467407, -1702.460327, 12.933974, 79.300003, -1.999999, -70.765060, 300.00, 300.00);
  43. SetDynamicObjectMaterial(badnje[7], 0, -1, "none", "none", 0xFF663333);
  44. SetDynamicObjectMaterial(badnje[7], 1, 801, "gta_proc_ferns", "veg_bushred", 0x00000000);
  45. badnje[8] = CreateDynamicObjectEx(19527, 1489.100097, -1714.280151, 13.036800, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  46. SetDynamicObjectMaterial(badnje[8], 0, 18996, "mattextures", "sampblack", 0x00000000);
  47. SetDynamicObjectMaterial(badnje[8], 1, 3922, "bistro", "Marble", 0x00000000);
  48. badnje[9] = CreateDynamicObjectEx(19527, 1489.084960, -1710.912353, 13.036800, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  49. SetDynamicObjectMaterial(badnje[9], 0, 18996, "mattextures", "sampblack", 0x00000000);
  50. SetDynamicObjectMaterial(badnje[9], 1, 3922, "bistro", "Marble", 0x00000000);
  51. /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  52. badnje[10] = CreateDynamicObjectEx(19793, 1478.128662, -1704.554565, 13.011699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  53. badnje[11] = CreateDynamicObjectEx(19793, 1478.148437, -1703.945312, 13.113699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  54. badnje[12] = CreateDynamicObjectEx(19793, 1478.148437, -1703.845336, 13.011699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  55. badnje[13] = CreateDynamicObjectEx(19793, 1478.148437, -1704.085327, 13.113699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  56. badnje[14] = CreateDynamicObjectEx(19793, 1478.148437, -1704.225341, 13.113699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  57. badnje[15] = CreateDynamicObjectEx(19793, 1478.148437, -1704.405273, 13.113699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  58. badnje[16] = CreateDynamicObjectEx(1516, 1488.061645, -1709.544799, 13.144700, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  59. badnje[17] = CreateDynamicObjectEx(1516, 1488.020019, -1713.055908, 13.144720, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  60. badnje[18] = CreateDynamicObjectEx(19820, 1489.976562, -1713.705688, 13.528900, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  61. badnje[19] = CreateDynamicObjectEx(19820, 1489.976562, -1713.905639, 13.528900, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  62. badnje[20] = CreateDynamicObjectEx(19820, 1489.976562, -1714.105590, 13.528900, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  63. badnje[21] = CreateDynamicObjectEx(19820, 1489.976562, -1714.265625, 13.528900, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  64. badnje[22] = CreateDynamicObjectEx(19835, 1487.546875, -1713.475830, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  65. badnje[23] = CreateDynamicObjectEx(19835, 1487.546875, -1713.295776, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  66. badnje[24] = CreateDynamicObjectEx(19835, 1487.546875, -1713.115844, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  67. badnje[25] = CreateDynamicObjectEx(19835, 1487.546875, -1712.935791, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  68. badnje[26] = CreateDynamicObjectEx(19835, 1487.546875, -1712.715820, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  69. badnje[27] = CreateDynamicObjectEx(19835, 1487.806884, -1712.715820, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  70. badnje[28] = CreateDynamicObjectEx(19835, 1487.806884, -1712.935791, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  71. badnje[29] = CreateDynamicObjectEx(19835, 1487.806884, -1713.115844, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  72. badnje[30] = CreateDynamicObjectEx(19835, 1487.806884, -1713.295776, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  73. badnje[31] = CreateDynamicObjectEx(19835, 1487.806884, -1713.495849, 13.750200, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  74. badnje[32] = CreateDynamicObjectEx(1328, 1488.913330, -1702.158813, 13.544659, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  75. badnje[33] = CreateDynamicObjectEx(1338, 1491.183105, -1716.504638, 12.886599, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  76. badnje[34] = CreateDynamicObjectEx(1328, 1469.072509, -1715.542846, 13.544659, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  77. badnje[35] = CreateDynamicObjectEx(1328, 1468.906982, -1706.676025, 13.544659, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  78. badnje[36] = CreateDynamicObjectEx(1328, 1468.950073, -1696.509399, 13.544659, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  79. badnje[37] = CreateDynamicObjectEx(1328, 1488.809448, -1695.943481, 13.544659, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  80. badnje[38] = CreateDynamicObjectEx(11747, 1487.683837, -1709.272827, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  81. badnje[39] = CreateDynamicObjectEx(11747, 1487.683837, -1709.392822, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  82. badnje[40] = CreateDynamicObjectEx(11747, 1487.683837, -1709.512817, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  83. badnje[41] = CreateDynamicObjectEx(11747, 1487.683837, -1709.632812, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  84. badnje[42] = CreateDynamicObjectEx(11747, 1487.683837, -1709.772827, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  85. badnje[43] = CreateDynamicObjectEx(11747, 1487.823852, -1709.772827, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  86. badnje[44] = CreateDynamicObjectEx(11747, 1487.823852, -1709.652832, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  87. badnje[45] = CreateDynamicObjectEx(11747, 1487.823852, -1709.552856, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  88. badnje[46] = CreateDynamicObjectEx(11747, 1487.823852, -1709.392944, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  89. badnje[47] = CreateDynamicObjectEx(11747, 1487.823852, -1709.212890, 13.690699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  90. badnje[48] = CreateDynamicObjectEx(11712, 1489.632446, -1712.270874, 13.365699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  91. badnje[49] = CreateDynamicObjectEx(11712, 1489.672363, -1708.404541, 13.365699, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  92. badnje[50] = CreateDynamicObjectEx(19844, 1488.125488, -1713.029052, 13.611300, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  93. badnje[51] = CreateDynamicObjectEx(19844, 1488.102050, -1709.530151, 13.611300, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  94.  
  95. Labeli[0] = CreateDynamic3DTextLabel("[ RAKIJA ]\nDobro vece, dobro nam dosla badnje vece\n/uzmirakiju",0xbca914ff, 1487.1975,-1709.5076,14.0469, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 15.0);
  96. Labeli[1] = CreateDynamic3DTextLabel("[ VINO ]\nDobro vece, dobro nam dosla badnje vece\n/uzmivino",0xbca914ff, 1487.0135,-1713.0232,14.0469, 30, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 15.0);
  97.  
  98. print("\n\n\n==============================================");
  99. print("> Badnje Vece fs by Terzic");
  100. print("> Badnje Vece fs ucitavanje...");
  101. print("> Badnje Vece fs uspesno ucitan!");
  102. print("==============================================\n\n\n");
  103. return 1;
  104. }
  105.  
  106. public OnFilterScriptExit()
  107. {
  108. DestroyDynamic3DTextLabel(Labeli[0]);
  109. DestroyDynamic3DTextLabel(Labeli[1]);
  110. return 1;
  111. }
  112.  
  113. public OnPlayerConnect(playerid)
  114. {
  115. RemoveBuildingForPlayer(playerid, 1231, 1479.695, -1716.703, 15.625, 0.250);
  116. RemoveBuildingForPlayer(playerid, 1280, 1488.765, -1713.703, 13.453, 0.250);
  117. RemoveBuildingForPlayer(playerid, 1231, 1479.695, -1702.531, 15.625, 0.250);
  118. return 1;
  119. }
  120. CMD:sklonibadnjevece(playerid, params[])
  121. {
  122. for(new i = 0; i < 52; i++) DestroyDynamicObject(badnje[i]);
  123. for(new i = 0; i < 21; i++) DestroyDynamicObject(vatra[i]);
  124.  
  125. DestroyDynamic3DTextLabel(Labeli[0]);
  126. DestroyDynamic3DTextLabel(Labeli[1]);
  127.  
  128. badnjevece = 0;
  129. return 1;
  130. }
  131.  
  132. CMD:zapalibadnjak(playerid, params[])
  133. {
  134. if(badnjevece == 0) return SendClientMessage(playerid, -1, "Badnje vece je zavrseno!");
  135. vatra[0] = CreateDynamicObjectEx(18688, 1479.293090, -1703.310546, 12.076877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  136. vatra[1] = CreateDynamicObjectEx(18688, 1479.293090, -1705.650878, 12.076877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  137. vatra[2] = CreateDynamicObjectEx(18688, 1478.022827, -1704.321044, 12.936877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  138. vatra[3] = CreateDynamicObjectEx(18688, 1476.182739, -1704.321044, 11.676876, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  139. vatra[4] = CreateDynamicObjectEx(18688, 1477.532958, -1704.321044, 14.426877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  140. vatra[5] = CreateDynamicObjectEx(18688, 1479.192993, -1704.321044, 14.426877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  141. vatra[6] = CreateDynamicObjectEx(18688, 1479.192993, -1704.321044, 12.966876, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  142. vatra[7] = CreateDynamicObjectEx(18688, 1476.903076, -1704.321044, 12.966876, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  143. vatra[8] = CreateDynamicObjectEx(18688, 1478.713256, -1700.501098, 11.716873, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  144. vatra[9] = CreateDynamicObjectEx(18688, 1476.973022, -1700.680419, 11.716873, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  145. vatra[10] = CreateDynamicObjectEx(18688, 1481.492797, -1702.510498, 12.166875, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  146. vatra[11] = CreateDynamicObjectEx(18688, 1480.692749, -1704.730590, 12.166875, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  147. vatra[12] = CreateDynamicObjectEx(18688, 1481.723266, -1701.220703, 13.316878, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  148. vatra[13] = CreateDynamicObjectEx(18688, 1478.293090, -1704.640747, 16.396883, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  149. vatra[14] = CreateDynamicObjectEx(18688, 1478.293090, -1704.420532, 18.286880, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  150. vatra[15] = CreateDynamicObjectEx(18688, 1478.293090, -1703.630371, 17.176876, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  151. vatra[16] = CreateDynamicObjectEx(18688, 1480.082885, -1706.240966, 12.706872, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  152. vatra[17] = CreateDynamicObjectEx(18688, 1480.583007, -1707.191406, 11.836868, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  153. vatra[18] = CreateDynamicObjectEx(18688, 1478.512817, -1706.521362, 11.836868, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  154. vatra[19] = CreateDynamicObjectEx(18688, 1477.332763, -1705.400512, 12.076877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  155. vatra[20] = CreateDynamicObjectEx(18688, 1477.332763, -1702.590209, 12.076877, 0.000000, 0.000000, 0.000000, 300.00, 300.00);
  156.  
  157. SendClientMessageToAll(0x6EF83Cff, "Badnjak je zapaljen!");
  158. return 1;
  159. }
  160.  
  161. CMD:uzmivino(playerid, params[])
  162. {
  163. if(badnjevece == 0) return 1;
  164. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1487.0135,-1713.0232,14.0469)) return SendClientMessage(playerid, -1, "[ERROR] Niste na mestu gde se uzima vino!");
  165. new ime[24], string[45];
  166. GetPlayerName(playerid, ime, sizeof(ime));
  167. format(string, sizeof(string), "* %s pije vino.", ime);
  168. ProxDetector(30.0, playerid, string,PURPLE1,PURPLE2,PURPLE3,PURPLE4,PURPLE5);
  169. SendClientMessage(playerid, -1, "Uzeli ste Vino.");
  170. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  171. return 1;
  172. }
  173.  
  174. CMD:uzmirakiju(playerid, params[])
  175. {
  176. if(badnjevece == 0) return 1;
  177. if(!IsPlayerInRangeOfPoint(playerid, 3.0, 1487.1975,-1709.5076,14.0469)) return SendClientMessage(playerid, -1, "[ERROR] Niste na mestu gde se uzima rakija!");
  178. new ime[24], string[45];
  179. GetPlayerName(playerid, ime, sizeof(ime));
  180. format(string, sizeof(string), "* %s pije rakiju.", ime);
  181. ProxDetector(30.0, playerid, string,PURPLE1,PURPLE2,PURPLE3,PURPLE4,PURPLE5);
  182. SendClientMessage(playerid, -1, "Uzeli ste Rakiju.");
  183. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  184. return 1;
  185. }
  186.  
  187. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  188. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  189. {
  190. if(IsPlayerConnected(playerid))
  191. {
  192. new Float:posx, Float:posy, Float:posz;
  193. new Float:oldposx, Float:oldposy, Float:oldposz;
  194. new Float:tempposx, Float:tempposy, Float:tempposz;
  195. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  196. for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
  197. {
  198. if(IsPlayerConnected(i))
  199. {
  200. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  201. {
  202. GetPlayerPos(i, posx, posy, posz);
  203. tempposx = (oldposx -posx);
  204. tempposy = (oldposy -posy);
  205. tempposz = (oldposz -posz);
  206. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  207. {
  208. SendClientMessage(i, col1, string);
  209. }
  210. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  211. {
  212. SendClientMessage(i, col2, string);
  213. }
  214. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  215. {
  216. SendClientMessage(i, col3, string);
  217. }
  218. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  219. {
  220. SendClientMessage(i, col4, string);
  221. }
  222. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  223. {
  224. SendClientMessage(i, col5, string);
  225. }
  226. } }
  227. }
  228. }
  229. return (true);
  230. }
Advertisement
Add Comment
Please, Sign In to add comment