Advertisement
Guest User

Barricades by Nick

a guest
Mar 27th, 2013
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.75 KB | None | 0 0
  1. //
  2. // Barricade by Joshman543 keep the credits
  3. //
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <foreach>
  7. #include <sscanf2>
  8.  
  9. #define FILTERSCRIPT
  10. // Colors
  11. #define COLOR_WHITE 0xFFFFFFFF
  12. #define COLOR_FADE1 0xE6E6E6E6
  13. #define COLOR_PM1 0xA65FC7FF
  14. #define COLOR_PM2 0xD35FC7FF
  15. #define COLOR_FADE2 0xC8C8C8C8
  16. #define COLOR_FADE3 0xAAAAAAAA
  17. #define COLOR_FADE4 0x8C8C8C8C
  18. #define COLOR_FADE5 0x6E6E6E6E
  19. #define TEAM_GROVE_COLOR 0x00AA00FF
  20. #define COLOR_OOC 0xE0FFFFFF
  21. #define COLOR_GREY 0xAFAFAFFF
  22. #define COLOR_LIGHTGREEN 0xADFF2FFF
  23. #define COLOR_LIGHTRED 0xFF6347FF
  24. #define COLOR_ALLDEPT 0xFF8282AA
  25. #define COLOR_DARKRED 0xAA3333FF
  26. #define COLOR_RED 0xFF0606FF
  27. #define TCOLOR_YELLOW 0xFFFF0000
  28. #define COLOR_TWPINK 0xE75480AA
  29. #define TEAM_HIT_COLOR 0xFFFFFF00
  30. #define COLOR_DBLUE 0x2641FEAA
  31. #define TEAM_CYAN_COLOR 0xFF8282AA
  32. #define COLOR_LIGHTBLUE 0x33CCFFFF
  33. #define COLOR_GREEN 0x33AA33FF
  34. #define COLOR_INDIGO 0x4B00B000
  35. #define COLOR_PINK 0xFF66FF00
  36. #define COLOR_BLACK 0x00000000
  37. #define COLOR_YELLOW 0xFFFF00FF
  38. #define COLOR_PURPLE 0xC2A2DAFF
  39. #define COLOR_ORANGE 0xFF9900FF
  40. #define COLOR_REPORT 0xFFFF91FF
  41. #define COLOR_RADIO 0x8D8DFFFF
  42. #define COLOR_DEPTRADIO 0xFFD700FF
  43. #define COLOR_BLUE 0x2641FEFF
  44. #define COLOR_MEDIC 0xFF8282FF
  45. #define COLOR_NEWBIE 0x7DAEFFFF
  46. #define COLOR_LIME 0x00FF00FF
  47. #define COLOR_NEWS 0x049C7100
  48. #define COLOR_CYAN 0x01FCFFFF
  49. #define COLOR_VIP 0xC93CCEFF
  50.  
  51. public OnFilterScriptInit()
  52. {
  53. print("\n--------------------------------------");
  54. print(" Barricades by Josh Loaded");
  55. print("--------------------------------------\n");
  56. return 1;
  57. }
  58.  
  59. public OnFilterScriptExit()
  60. {
  61. print("\n----------------------------------");
  62. print(" Barricades by Josh Unloaded");
  63. print("----------------------------------\n");
  64. return 1;
  65. }
  66.  
  67. //Barricade Enum and Info
  68. #define MAX_BARRICADES 11 //Ignore 1 //Changing that = fuckign up the serevr, so please do not change that!! You will fuck up the server! DO NOT DO THIS!!!!!!
  69. enum barricadeInfo
  70. {
  71. barricadeID,
  72. Float:barricadePosX,
  73. Float:barricadePosY,
  74. Float:barricadePosZ,
  75. Float:barricadeAngle,
  76. barricadeExist1,
  77. barricadeExist2,
  78. barricadeExist3,
  79. barricadeExist4,
  80. barricadeExist5,
  81. barricadeExist6,
  82. barricadeExist7,
  83. barricadeExist8,
  84. barricadeExist9,
  85. barricadeExist10
  86. }
  87.  
  88. new BarricadeInfo[MAX_BARRICADES][barricadeInfo];
  89.  
  90. public OnPlayerConnect(playerid)
  91. {
  92. return 1;
  93. }
  94.  
  95. CMD:barricadehelp(playerid, params[])
  96. {
  97. SendClientMessage(playerid, COLOR_GREEN, "_____________Barricade System by Josh!______________");
  98. SendClientMessage(playerid, COLOR_YELLOW, "HELP: {FFFFFF}/barricade -Create a new one, or delete an old one");
  99. SendClientMessage(playerid, COLOR_YELLOW, "CREDITS: {FFFFFF}Nick Derlos- base creator");
  100. SendClientMessage(playerid, COLOR_YELLOW, "CREDITS: {FFFFFF}Joshman543 editor");
  101. return 1;
  102. }
  103.  
  104. CMD:barricade(playerid, params[])
  105. {
  106. if(IsPlayerInAnyVehicle(playerid))
  107. {
  108. SendClientMessage(playerid, COLOR_GREY, "You must be on foot to use this command.");
  109. return 1;
  110. }
  111. ShowPlayerDialog(playerid, 300, DIALOG_STYLE_LIST, "LSPD Baricades", "Deploy new one\nRemove existing one", "Select", "Close");
  112. return 1;
  113. }
  114.  
  115. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  116. {
  117. if(dialogid == 300 && response)
  118. {
  119. switch(listitem)
  120. {
  121. case 0:
  122. {
  123. ShowPlayerDialog(playerid, 302, DIALOG_STYLE_LIST, "LSPD Baricades", "Deploy Barricade 1\nDeploy Barricade 2\nDeploy Barricade 3\nDeploy Barricade 4\nDeploy Barricade 5\nDeploy Barricade 6\nDeploy Barricade 7\nDeploy Barricade 8\nDeploy Barricade 9\nDeploy Barricade 10\n", "Select", "Close");
  124. }
  125. case 1:
  126. {
  127. ShowPlayerDialog(playerid, 301, DIALOG_STYLE_LIST, "LSPD Baricades", "Remove Barricade 1\nRemove Barricade 2\nRemove Barricade 3\nRemove Barricade 4\nRemove Barricade 5\nRemove Barricade 6\nRemove Barricade 7\nRemove Barricade 8\nRemove Barricade 9\nRemove Barricade 10\n", "Select", "Close");
  128. }
  129. }
  130. }
  131. else if(dialogid == 301 && response)
  132. {
  133. switch(listitem)
  134. {
  135. case 0:
  136. {
  137. DestroyObject(BarricadeInfo[1][barricadeID]);
  138. }
  139. case 1:
  140. {
  141. DestroyObject(BarricadeInfo[2][barricadeID]);
  142. }
  143. case 2:
  144. {
  145. DestroyObject(BarricadeInfo[3][barricadeID]);
  146. }
  147. case 3:
  148. {
  149. DestroyObject(BarricadeInfo[4][barricadeID]);
  150. }
  151. case 4:
  152. {
  153. DestroyObject(BarricadeInfo[5][barricadeID]);
  154. }
  155. case 5:
  156. {
  157. DestroyObject(BarricadeInfo[6][barricadeID]);
  158. }
  159. case 6:
  160. {
  161. DestroyObject(BarricadeInfo[7][barricadeID]);
  162. }
  163. case 7:
  164. {
  165. DestroyObject(BarricadeInfo[8][barricadeID]);
  166. }
  167. case 8:
  168. {
  169. DestroyObject(BarricadeInfo[9][barricadeID]);
  170. }
  171. case 9:
  172. {
  173. DestroyObject(BarricadeInfo[10][barricadeID]);
  174. }
  175. }
  176. }
  177. else if(dialogid == 302 && response)
  178. {
  179. switch(listitem)
  180. {
  181. case 0:
  182. {
  183. ShowPlayerDialog(playerid, 321, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  184. }
  185. case 1:
  186. {
  187. ShowPlayerDialog(playerid, 322, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  188. }
  189. case 2:
  190. {
  191. ShowPlayerDialog(playerid, 323, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  192. }
  193. case 3:
  194. {
  195. ShowPlayerDialog(playerid, 324, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  196. }
  197. case 4:
  198. {
  199. ShowPlayerDialog(playerid, 325, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  200. }
  201. case 5:
  202. {
  203. ShowPlayerDialog(playerid, 326, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  204. }
  205. case 6:
  206. {
  207. ShowPlayerDialog(playerid, 327, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  208. }
  209. case 7:
  210. {
  211. ShowPlayerDialog(playerid, 328, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  212. }
  213. case 8:
  214. {
  215. ShowPlayerDialog(playerid, 329, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  216. }
  217. case 9:
  218. {
  219. ShowPlayerDialog(playerid, 330, DIALOG_STYLE_LIST, "LSPD Baricades", "Water Filled Roadblock\nDETOUR sign\n5 Blocks at row\nCone", "Deploy", "Cancel");
  220. }
  221. }
  222. }
  223. else if(dialogid == 321 && response)
  224. {
  225. switch(listitem)
  226. {
  227. case 0:
  228. {
  229. if(BarricadeInfo[1][barricadeExist1] == 0)
  230. {
  231. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  232. GetPlayerPos(playerid, PosX, PosY, PosZ);
  233. GetPlayerFacingAngle(playerid, Angle);
  234. BarricadeInfo[1][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  235. BarricadeInfo[1][barricadeExist1] = 1;
  236. }
  237. else if(BarricadeInfo[1][barricadeExist1] == 1)
  238. {
  239. DestroyObject(BarricadeInfo[1][barricadeID]);
  240. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  241. GetPlayerPos(playerid, PosX, PosY, PosZ);
  242. GetPlayerFacingAngle(playerid, Angle);
  243. BarricadeInfo[1][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  244. BarricadeInfo[1][barricadeExist1] = 1;
  245. }
  246. }
  247. case 1:
  248. {
  249. if(BarricadeInfo[1][barricadeExist1] == 0)
  250. {
  251. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  252. GetPlayerPos(playerid, PosX, PosY, PosZ);
  253. GetPlayerFacingAngle(playerid, Angle);
  254. BarricadeInfo[1][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  255. BarricadeInfo[1][barricadeExist1] = 1;
  256. }
  257. else if(BarricadeInfo[1][barricadeExist1] == 1)
  258. {
  259. DestroyObject(BarricadeInfo[1][barricadeID]);
  260. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  261. GetPlayerPos(playerid, PosX, PosY, PosZ);
  262. GetPlayerFacingAngle(playerid, Angle);
  263. BarricadeInfo[1][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  264. BarricadeInfo[1][barricadeExist1] = 1;
  265. }
  266. }
  267. case 2:
  268. {
  269. if(BarricadeInfo[1][barricadeExist1] == 0)
  270. {
  271. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  272. GetPlayerPos(playerid, PosX, PosY, PosZ);
  273. GetPlayerFacingAngle(playerid, Angle);
  274. BarricadeInfo[1][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  275. BarricadeInfo[1][barricadeExist1] = 1;
  276. }
  277. else if(BarricadeInfo[1][barricadeExist1] == 1)
  278. {
  279. DestroyObject(BarricadeInfo[1][barricadeID]);
  280. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  281. GetPlayerPos(playerid, PosX, PosY, PosZ);
  282. GetPlayerFacingAngle(playerid, Angle);
  283. BarricadeInfo[1][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  284. BarricadeInfo[1][barricadeExist1] = 1;
  285. }
  286. }
  287. case 3:
  288. {
  289. if(BarricadeInfo[1][barricadeExist1] == 0)
  290. {
  291. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  292. GetPlayerPos(playerid, PosX, PosY, PosZ);
  293. GetPlayerFacingAngle(playerid, Angle);
  294. BarricadeInfo[1][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  295. BarricadeInfo[1][barricadeExist1] = 1;
  296. }
  297. else if(BarricadeInfo[1][barricadeExist1] == 1)
  298. {
  299. DestroyObject(BarricadeInfo[1][barricadeID]);
  300. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  301. GetPlayerPos(playerid, PosX, PosY, PosZ);
  302. GetPlayerFacingAngle(playerid, Angle);
  303. BarricadeInfo[1][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  304. BarricadeInfo[1][barricadeExist1] = 1;
  305. }
  306. }
  307. }
  308. }
  309. else if(dialogid == 322 && response)
  310. {
  311. switch(listitem)
  312. {
  313. case 0:
  314. {
  315. if(BarricadeInfo[2][barricadeExist2] == 0)
  316. {
  317. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  318. GetPlayerPos(playerid, PosX, PosY, PosZ);
  319. GetPlayerFacingAngle(playerid, Angle);
  320. BarricadeInfo[2][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  321. BarricadeInfo[2][barricadeExist2] = 1;
  322. }
  323. else if(BarricadeInfo[2][barricadeExist2] == 1)
  324. {
  325. DestroyObject(BarricadeInfo[2][barricadeID]);
  326. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  327. GetPlayerPos(playerid, PosX, PosY, PosZ);
  328. GetPlayerFacingAngle(playerid, Angle);
  329. BarricadeInfo[2][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  330. BarricadeInfo[2][barricadeExist2] = 1;
  331. }
  332. }
  333. case 1:
  334. {
  335. if(BarricadeInfo[2][barricadeExist2] == 0)
  336. {
  337. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  338. GetPlayerPos(playerid, PosX, PosY, PosZ);
  339. GetPlayerFacingAngle(playerid, Angle);
  340. BarricadeInfo[2][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  341. BarricadeInfo[2][barricadeExist2] = 1;
  342. }
  343. else if(BarricadeInfo[2][barricadeExist2] == 1)
  344. {
  345. DestroyObject(BarricadeInfo[2][barricadeID]);
  346. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  347. GetPlayerPos(playerid, PosX, PosY, PosZ);
  348. GetPlayerFacingAngle(playerid, Angle);
  349. BarricadeInfo[2][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  350. BarricadeInfo[2][barricadeExist2] = 1;
  351. }
  352. }
  353. case 2:
  354. {
  355. if(BarricadeInfo[2][barricadeExist2] == 0)
  356. {
  357. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  358. GetPlayerPos(playerid, PosX, PosY, PosZ);
  359. GetPlayerFacingAngle(playerid, Angle);
  360. BarricadeInfo[2][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  361. BarricadeInfo[2][barricadeExist2] = 1;
  362. }
  363. else if(BarricadeInfo[2][barricadeExist2] == 1)
  364. {
  365. DestroyObject(BarricadeInfo[1][barricadeID]);
  366. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  367. GetPlayerPos(playerid, PosX, PosY, PosZ);
  368. GetPlayerFacingAngle(playerid, Angle);
  369. BarricadeInfo[2][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  370. BarricadeInfo[2][barricadeExist2] = 1;
  371. }
  372. }
  373. case 3:
  374. {
  375. if(BarricadeInfo[2][barricadeExist2] == 0)
  376. {
  377. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  378. GetPlayerPos(playerid, PosX, PosY, PosZ);
  379. GetPlayerFacingAngle(playerid, Angle);
  380. BarricadeInfo[2][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  381. BarricadeInfo[2][barricadeExist2] = 1;
  382. }
  383. else if(BarricadeInfo[2][barricadeExist2] == 1)
  384. {
  385. DestroyObject(BarricadeInfo[2][barricadeID]);
  386. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  387. GetPlayerPos(playerid, PosX, PosY, PosZ);
  388. GetPlayerFacingAngle(playerid, Angle);
  389. BarricadeInfo[2][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  390. BarricadeInfo[2][barricadeExist2] = 1;
  391. }
  392. }
  393. }
  394. }
  395. else if(dialogid == 323 && response)
  396. {
  397. switch(listitem)
  398. {
  399. case 0:
  400. {
  401. if(BarricadeInfo[3][barricadeExist3] == 0)
  402. {
  403. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  404. GetPlayerPos(playerid, PosX, PosY, PosZ);
  405. GetPlayerFacingAngle(playerid, Angle);
  406. BarricadeInfo[3][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  407. BarricadeInfo[3][barricadeExist3] = 1;
  408. }
  409. else if(BarricadeInfo[3][barricadeExist3] == 1)
  410. {
  411. DestroyObject(BarricadeInfo[3][barricadeID]);
  412. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  413. GetPlayerPos(playerid, PosX, PosY, PosZ);
  414. GetPlayerFacingAngle(playerid, Angle);
  415. BarricadeInfo[3][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  416. BarricadeInfo[3][barricadeExist3] = 1;
  417. }
  418. }
  419. case 1:
  420. {
  421. if(BarricadeInfo[3][barricadeExist3] == 0)
  422. {
  423. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  424. GetPlayerPos(playerid, PosX, PosY, PosZ);
  425. GetPlayerFacingAngle(playerid, Angle);
  426. BarricadeInfo[3][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  427. BarricadeInfo[3][barricadeExist3] = 1;
  428. }
  429. else if(BarricadeInfo[3][barricadeExist3] == 1)
  430. {
  431. DestroyObject(BarricadeInfo[3][barricadeID]);
  432. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  433. GetPlayerPos(playerid, PosX, PosY, PosZ);
  434. GetPlayerFacingAngle(playerid, Angle);
  435. BarricadeInfo[3][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  436. BarricadeInfo[3][barricadeExist3] = 1;
  437. }
  438. }
  439. case 2:
  440. {
  441. if(BarricadeInfo[3][barricadeExist3] == 0)
  442. {
  443. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  444. GetPlayerPos(playerid, PosX, PosY, PosZ);
  445. GetPlayerFacingAngle(playerid, Angle);
  446. BarricadeInfo[3][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  447. BarricadeInfo[3][barricadeExist3] = 1;
  448. }
  449. else if(BarricadeInfo[3][barricadeExist3] == 1)
  450. {
  451. DestroyObject(BarricadeInfo[1][barricadeID]);
  452. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  453. GetPlayerPos(playerid, PosX, PosY, PosZ);
  454. GetPlayerFacingAngle(playerid, Angle);
  455. BarricadeInfo[3][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  456. BarricadeInfo[3][barricadeExist3] = 1;
  457. }
  458. }
  459. case 3:
  460. {
  461. if(BarricadeInfo[3][barricadeExist3] == 0)
  462. {
  463. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  464. GetPlayerPos(playerid, PosX, PosY, PosZ);
  465. GetPlayerFacingAngle(playerid, Angle);
  466. BarricadeInfo[3][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  467. BarricadeInfo[3][barricadeExist3] = 1;
  468. }
  469. else if(BarricadeInfo[3][barricadeExist3] == 1)
  470. {
  471. DestroyObject(BarricadeInfo[3][barricadeID]);
  472. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  473. GetPlayerPos(playerid, PosX, PosY, PosZ);
  474. GetPlayerFacingAngle(playerid, Angle);
  475. BarricadeInfo[3][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  476. BarricadeInfo[3][barricadeExist3] = 1;
  477. }
  478. }
  479. }
  480. }
  481. else if(dialogid == 324 && response)
  482. {
  483. switch(listitem)
  484. {
  485. case 0:
  486. {
  487. if(BarricadeInfo[4][barricadeExist4] == 0)
  488. {
  489. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  490. GetPlayerPos(playerid, PosX, PosY, PosZ);
  491. GetPlayerFacingAngle(playerid, Angle);
  492. BarricadeInfo[4][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  493. BarricadeInfo[4][barricadeExist4] = 1;
  494. }
  495. else if(BarricadeInfo[4][barricadeExist4] == 1)
  496. {
  497. DestroyObject(BarricadeInfo[4][barricadeID]);
  498. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  499. GetPlayerPos(playerid, PosX, PosY, PosZ);
  500. GetPlayerFacingAngle(playerid, Angle);
  501. BarricadeInfo[4][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  502. BarricadeInfo[4][barricadeExist4] = 1;
  503. }
  504. }
  505. case 1:
  506. {
  507. if(BarricadeInfo[4][barricadeExist4] == 0)
  508. {
  509. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  510. GetPlayerPos(playerid, PosX, PosY, PosZ);
  511. GetPlayerFacingAngle(playerid, Angle);
  512. BarricadeInfo[4][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  513. BarricadeInfo[4][barricadeExist4] = 1;
  514. }
  515. else if(BarricadeInfo[4][barricadeExist4] == 1)
  516. {
  517. DestroyObject(BarricadeInfo[4][barricadeID]);
  518. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  519. GetPlayerPos(playerid, PosX, PosY, PosZ);
  520. GetPlayerFacingAngle(playerid, Angle);
  521. BarricadeInfo[4][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  522. BarricadeInfo[4][barricadeExist4] = 1;
  523. }
  524. }
  525. case 2:
  526. {
  527. if(BarricadeInfo[4][barricadeExist4] == 0)
  528. {
  529. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  530. GetPlayerPos(playerid, PosX, PosY, PosZ);
  531. GetPlayerFacingAngle(playerid, Angle);
  532. BarricadeInfo[4][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  533. BarricadeInfo[4][barricadeExist4] = 1;
  534. }
  535. else if(BarricadeInfo[4][barricadeExist4] == 1)
  536. {
  537. DestroyObject(BarricadeInfo[1][barricadeID]);
  538. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  539. GetPlayerPos(playerid, PosX, PosY, PosZ);
  540. GetPlayerFacingAngle(playerid, Angle);
  541. BarricadeInfo[4][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  542. BarricadeInfo[4][barricadeExist4] = 1;
  543. }
  544. }
  545. case 3:
  546. {
  547. if(BarricadeInfo[4][barricadeExist4] == 0)
  548. {
  549. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  550. GetPlayerPos(playerid, PosX, PosY, PosZ);
  551. GetPlayerFacingAngle(playerid, Angle);
  552. BarricadeInfo[4][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  553. BarricadeInfo[4][barricadeExist4] = 1;
  554. }
  555. else if(BarricadeInfo[4][barricadeExist4] == 1)
  556. {
  557. DestroyObject(BarricadeInfo[4][barricadeID]);
  558. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  559. GetPlayerPos(playerid, PosX, PosY, PosZ);
  560. GetPlayerFacingAngle(playerid, Angle);
  561. BarricadeInfo[4][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  562. BarricadeInfo[4][barricadeExist4] = 1;
  563. }
  564. }
  565. }
  566. }
  567. else if(dialogid == 325 && response)
  568. {
  569. switch(listitem)
  570. {
  571. case 0:
  572. {
  573. if(BarricadeInfo[5][barricadeExist5] == 0)
  574. {
  575. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  576. GetPlayerPos(playerid, PosX, PosY, PosZ);
  577. GetPlayerFacingAngle(playerid, Angle);
  578. BarricadeInfo[5][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  579. BarricadeInfo[5][barricadeExist5] = 1;
  580. }
  581. else if(BarricadeInfo[5][barricadeExist5] == 1)
  582. {
  583. DestroyObject(BarricadeInfo[5][barricadeID]);
  584. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  585. GetPlayerPos(playerid, PosX, PosY, PosZ);
  586. GetPlayerFacingAngle(playerid, Angle);
  587. BarricadeInfo[5][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  588. BarricadeInfo[5][barricadeExist5] = 1;
  589. }
  590. }
  591. case 1:
  592. {
  593. if(BarricadeInfo[5][barricadeExist5] == 0)
  594. {
  595. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  596. GetPlayerPos(playerid, PosX, PosY, PosZ);
  597. GetPlayerFacingAngle(playerid, Angle);
  598. BarricadeInfo[5][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  599. BarricadeInfo[5][barricadeExist5] = 1;
  600. }
  601. else if(BarricadeInfo[5][barricadeExist5] == 1)
  602. {
  603. DestroyObject(BarricadeInfo[5][barricadeID]);
  604. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  605. GetPlayerPos(playerid, PosX, PosY, PosZ);
  606. GetPlayerFacingAngle(playerid, Angle);
  607. BarricadeInfo[5][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  608. BarricadeInfo[5][barricadeExist5] = 1;
  609. }
  610. }
  611. case 2:
  612. {
  613. if(BarricadeInfo[5][barricadeExist5] == 0)
  614. {
  615. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  616. GetPlayerPos(playerid, PosX, PosY, PosZ);
  617. GetPlayerFacingAngle(playerid, Angle);
  618. BarricadeInfo[5][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  619. BarricadeInfo[5][barricadeExist5] = 1;
  620. }
  621. else if(BarricadeInfo[5][barricadeExist5] == 1)
  622. {
  623. DestroyObject(BarricadeInfo[5][barricadeID]);
  624. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  625. GetPlayerPos(playerid, PosX, PosY, PosZ);
  626. GetPlayerFacingAngle(playerid, Angle);
  627. BarricadeInfo[5][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  628. BarricadeInfo[5][barricadeExist5] = 1;
  629. }
  630. }
  631. case 3:
  632. {
  633. if(BarricadeInfo[5][barricadeExist5] == 0)
  634. {
  635. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  636. GetPlayerPos(playerid, PosX, PosY, PosZ);
  637. GetPlayerFacingAngle(playerid, Angle);
  638. BarricadeInfo[5][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  639. BarricadeInfo[5][barricadeExist5] = 1;
  640. }
  641. else if(BarricadeInfo[5][barricadeExist5] == 1)
  642. {
  643. DestroyObject(BarricadeInfo[5][barricadeID]);
  644. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  645. GetPlayerPos(playerid, PosX, PosY, PosZ);
  646. GetPlayerFacingAngle(playerid, Angle);
  647. BarricadeInfo[5][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  648. BarricadeInfo[5][barricadeExist5] = 1;
  649. }
  650. }
  651. }
  652. }
  653. else if(dialogid == 326 && response)
  654. {
  655. switch(listitem)
  656. {
  657. case 0:
  658. {
  659. if(BarricadeInfo[6][barricadeExist6] == 0)
  660. {
  661. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  662. GetPlayerPos(playerid, PosX, PosY, PosZ);
  663. GetPlayerFacingAngle(playerid, Angle);
  664. BarricadeInfo[6][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  665. BarricadeInfo[6][barricadeExist6] = 1;
  666. }
  667. else if(BarricadeInfo[6][barricadeExist6] == 1)
  668. {
  669. DestroyObject(BarricadeInfo[6][barricadeID]);
  670. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  671. GetPlayerPos(playerid, PosX, PosY, PosZ);
  672. GetPlayerFacingAngle(playerid, Angle);
  673. BarricadeInfo[6][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  674. BarricadeInfo[6][barricadeExist6] = 1;
  675. }
  676. }
  677. case 1:
  678. {
  679. if(BarricadeInfo[6][barricadeExist6] == 0)
  680. {
  681. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  682. GetPlayerPos(playerid, PosX, PosY, PosZ);
  683. GetPlayerFacingAngle(playerid, Angle);
  684. BarricadeInfo[6][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  685. BarricadeInfo[6][barricadeExist6] = 1;
  686. }
  687. else if(BarricadeInfo[6][barricadeExist6] == 1)
  688. {
  689. DestroyObject(BarricadeInfo[6][barricadeID]);
  690. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  691. GetPlayerPos(playerid, PosX, PosY, PosZ);
  692. GetPlayerFacingAngle(playerid, Angle);
  693. BarricadeInfo[6][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  694. BarricadeInfo[6][barricadeExist6] = 1;
  695. }
  696. }
  697. case 2:
  698. {
  699. if(BarricadeInfo[6][barricadeExist6] == 0)
  700. {
  701. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  702. GetPlayerPos(playerid, PosX, PosY, PosZ);
  703. GetPlayerFacingAngle(playerid, Angle);
  704. BarricadeInfo[6][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  705. BarricadeInfo[6][barricadeExist6] = 1;
  706. }
  707. else if(BarricadeInfo[6][barricadeExist6] == 1)
  708. {
  709. DestroyObject(BarricadeInfo[6][barricadeID]);
  710. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  711. GetPlayerPos(playerid, PosX, PosY, PosZ);
  712. GetPlayerFacingAngle(playerid, Angle);
  713. BarricadeInfo[6][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  714. BarricadeInfo[6][barricadeExist6] = 1;
  715. }
  716. }
  717. case 3:
  718. {
  719. if(BarricadeInfo[6][barricadeExist6] == 0)
  720. {
  721. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  722. GetPlayerPos(playerid, PosX, PosY, PosZ);
  723. GetPlayerFacingAngle(playerid, Angle);
  724. BarricadeInfo[6][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  725. BarricadeInfo[6][barricadeExist6] = 1;
  726. }
  727. else if(BarricadeInfo[6][barricadeExist6] == 1)
  728. {
  729. DestroyObject(BarricadeInfo[6][barricadeID]);
  730. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  731. GetPlayerPos(playerid, PosX, PosY, PosZ);
  732. GetPlayerFacingAngle(playerid, Angle);
  733. BarricadeInfo[6][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  734. BarricadeInfo[6][barricadeExist6] = 1;
  735. }
  736. }
  737. }
  738. }
  739. else if(dialogid == 327 && response)
  740. {
  741. switch(listitem)
  742. {
  743. case 0:
  744. {
  745. if(BarricadeInfo[7][barricadeExist7] == 0)
  746. {
  747. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  748. GetPlayerPos(playerid, PosX, PosY, PosZ);
  749. GetPlayerFacingAngle(playerid, Angle);
  750. BarricadeInfo[7][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  751. BarricadeInfo[7][barricadeExist7] = 1;
  752. }
  753. else if(BarricadeInfo[7][barricadeExist7] == 1)
  754. {
  755. DestroyObject(BarricadeInfo[7][barricadeID]);
  756. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  757. GetPlayerPos(playerid, PosX, PosY, PosZ);
  758. GetPlayerFacingAngle(playerid, Angle);
  759. BarricadeInfo[7][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  760. BarricadeInfo[7][barricadeExist7] = 1;
  761. }
  762. }
  763. case 1:
  764. {
  765. if(BarricadeInfo[7][barricadeExist7] == 0)
  766. {
  767. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  768. GetPlayerPos(playerid, PosX, PosY, PosZ);
  769. GetPlayerFacingAngle(playerid, Angle);
  770. BarricadeInfo[7][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  771. BarricadeInfo[7][barricadeExist7] = 1;
  772. }
  773. else if(BarricadeInfo[7][barricadeExist7] == 1)
  774. {
  775. DestroyObject(BarricadeInfo[7][barricadeID]);
  776. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  777. GetPlayerPos(playerid, PosX, PosY, PosZ);
  778. GetPlayerFacingAngle(playerid, Angle);
  779. BarricadeInfo[7][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  780. BarricadeInfo[7][barricadeExist7] = 1;
  781. }
  782. }
  783. case 2:
  784. {
  785. if(BarricadeInfo[7][barricadeExist7] == 0)
  786. {
  787. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  788. GetPlayerPos(playerid, PosX, PosY, PosZ);
  789. GetPlayerFacingAngle(playerid, Angle);
  790. BarricadeInfo[7][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  791. BarricadeInfo[7][barricadeExist7] = 1;
  792. }
  793. else if(BarricadeInfo[7][barricadeExist7] == 1)
  794. {
  795. DestroyObject(BarricadeInfo[7][barricadeID]);
  796. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  797. GetPlayerPos(playerid, PosX, PosY, PosZ);
  798. GetPlayerFacingAngle(playerid, Angle);
  799. BarricadeInfo[7][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  800. BarricadeInfo[7][barricadeExist7] = 1;
  801. }
  802. }
  803. case 3:
  804. {
  805. if(BarricadeInfo[7][barricadeExist7] == 0)
  806. {
  807. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  808. GetPlayerPos(playerid, PosX, PosY, PosZ);
  809. GetPlayerFacingAngle(playerid, Angle);
  810. BarricadeInfo[7][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  811. BarricadeInfo[7][barricadeExist7] = 1;
  812. }
  813. else if(BarricadeInfo[7][barricadeExist7] == 1)
  814. {
  815. DestroyObject(BarricadeInfo[7][barricadeID]);
  816. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  817. GetPlayerPos(playerid, PosX, PosY, PosZ);
  818. GetPlayerFacingAngle(playerid, Angle);
  819. BarricadeInfo[7][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  820. BarricadeInfo[7][barricadeExist7] = 1;
  821. }
  822. }
  823. }
  824. }
  825. else if(dialogid == 328 && response)
  826. {
  827. switch(listitem)
  828. {
  829. case 0:
  830. {
  831. if(BarricadeInfo[8][barricadeExist8] == 0)
  832. {
  833. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  834. GetPlayerPos(playerid, PosX, PosY, PosZ);
  835. GetPlayerFacingAngle(playerid, Angle);
  836. BarricadeInfo[8][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  837. BarricadeInfo[8][barricadeExist8] = 1;
  838. }
  839. else if(BarricadeInfo[8][barricadeExist8] == 1)
  840. {
  841. DestroyObject(BarricadeInfo[8][barricadeID]);
  842. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  843. GetPlayerPos(playerid, PosX, PosY, PosZ);
  844. GetPlayerFacingAngle(playerid, Angle);
  845. BarricadeInfo[8][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  846. BarricadeInfo[8][barricadeExist8] = 1;
  847. }
  848. }
  849. case 1:
  850. {
  851. if(BarricadeInfo[8][barricadeExist8] == 0)
  852. {
  853. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  854. GetPlayerPos(playerid, PosX, PosY, PosZ);
  855. GetPlayerFacingAngle(playerid, Angle);
  856. BarricadeInfo[8][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  857. BarricadeInfo[8][barricadeExist8] = 1;
  858. }
  859. else if(BarricadeInfo[8][barricadeExist8] == 1)
  860. {
  861. DestroyObject(BarricadeInfo[8][barricadeID]);
  862. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  863. GetPlayerPos(playerid, PosX, PosY, PosZ);
  864. GetPlayerFacingAngle(playerid, Angle);
  865. BarricadeInfo[8][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  866. BarricadeInfo[8][barricadeExist8] = 1;
  867. }
  868. }
  869. case 2:
  870. {
  871. if(BarricadeInfo[8][barricadeExist8] == 0)
  872. {
  873. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  874. GetPlayerPos(playerid, PosX, PosY, PosZ);
  875. GetPlayerFacingAngle(playerid, Angle);
  876. BarricadeInfo[8][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  877. BarricadeInfo[8][barricadeExist8] = 1;
  878. }
  879. else if(BarricadeInfo[8][barricadeExist8] == 1)
  880. {
  881. DestroyObject(BarricadeInfo[8][barricadeID]);
  882. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  883. GetPlayerPos(playerid, PosX, PosY, PosZ);
  884. GetPlayerFacingAngle(playerid, Angle);
  885. BarricadeInfo[8][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  886. BarricadeInfo[8][barricadeExist8] = 1;
  887. }
  888. }
  889. case 3:
  890. {
  891. if(BarricadeInfo[8][barricadeExist8] == 0)
  892. {
  893. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  894. GetPlayerPos(playerid, PosX, PosY, PosZ);
  895. GetPlayerFacingAngle(playerid, Angle);
  896. BarricadeInfo[8][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  897. BarricadeInfo[8][barricadeExist8] = 1;
  898. }
  899. else if(BarricadeInfo[8][barricadeExist8] == 1)
  900. {
  901. DestroyObject(BarricadeInfo[8][barricadeID]);
  902. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  903. GetPlayerPos(playerid, PosX, PosY, PosZ);
  904. GetPlayerFacingAngle(playerid, Angle);
  905. BarricadeInfo[8][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  906. BarricadeInfo[8][barricadeExist8] = 1;
  907. }
  908. }
  909. }
  910. }
  911. else if(dialogid == 329 && response)
  912. {
  913. switch(listitem)
  914. {
  915. case 0:
  916. {
  917. if(BarricadeInfo[9][barricadeExist9] == 0)
  918. {
  919. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  920. GetPlayerPos(playerid, PosX, PosY, PosZ);
  921. GetPlayerFacingAngle(playerid, Angle);
  922. BarricadeInfo[9][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  923. BarricadeInfo[9][barricadeExist9] = 1;
  924. }
  925. else if(BarricadeInfo[9][barricadeExist9] == 1)
  926. {
  927. DestroyObject(BarricadeInfo[9][barricadeID]);
  928. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  929. GetPlayerPos(playerid, PosX, PosY, PosZ);
  930. GetPlayerFacingAngle(playerid, Angle);
  931. BarricadeInfo[9][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  932. BarricadeInfo[9][barricadeExist9] = 1;
  933. }
  934. }
  935. case 1:
  936. {
  937. if(BarricadeInfo[9][barricadeExist9] == 0)
  938. {
  939. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  940. GetPlayerPos(playerid, PosX, PosY, PosZ);
  941. GetPlayerFacingAngle(playerid, Angle);
  942. BarricadeInfo[9][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  943. BarricadeInfo[9][barricadeExist9] = 1;
  944. }
  945. else if(BarricadeInfo[9][barricadeExist9] == 1)
  946. {
  947. DestroyObject(BarricadeInfo[9][barricadeID]);
  948. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  949. GetPlayerPos(playerid, PosX, PosY, PosZ);
  950. GetPlayerFacingAngle(playerid, Angle);
  951. BarricadeInfo[9][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  952. BarricadeInfo[9][barricadeExist9] = 1;
  953. }
  954. }
  955. case 2:
  956. {
  957. if(BarricadeInfo[9][barricadeExist9] == 0)
  958. {
  959. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  960. GetPlayerPos(playerid, PosX, PosY, PosZ);
  961. GetPlayerFacingAngle(playerid, Angle);
  962. BarricadeInfo[9][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  963. BarricadeInfo[9][barricadeExist9] = 1;
  964. }
  965. else if(BarricadeInfo[9][barricadeExist9] == 1)
  966. {
  967. DestroyObject(BarricadeInfo[9][barricadeID]);
  968. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  969. GetPlayerPos(playerid, PosX, PosY, PosZ);
  970. GetPlayerFacingAngle(playerid, Angle);
  971. BarricadeInfo[9][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  972. BarricadeInfo[9][barricadeExist9] = 1;
  973. }
  974. }
  975. case 3:
  976. {
  977. if(BarricadeInfo[9][barricadeExist9] == 0)
  978. {
  979. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  980. GetPlayerPos(playerid, PosX, PosY, PosZ);
  981. GetPlayerFacingAngle(playerid, Angle);
  982. BarricadeInfo[9][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  983. BarricadeInfo[9][barricadeExist9] = 1;
  984. }
  985. else if(BarricadeInfo[9][barricadeExist9] == 1)
  986. {
  987. DestroyObject(BarricadeInfo[9][barricadeID]);
  988. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  989. GetPlayerPos(playerid, PosX, PosY, PosZ);
  990. GetPlayerFacingAngle(playerid, Angle);
  991. BarricadeInfo[9][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  992. BarricadeInfo[9][barricadeExist9] = 1;
  993. }
  994. }
  995. }
  996. }
  997. else if(dialogid == 330 && response)
  998. {
  999. switch(listitem)
  1000. {
  1001. case 0:
  1002. {
  1003. if(BarricadeInfo[10][barricadeExist10] == 0)
  1004. {
  1005. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1006. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1007. GetPlayerFacingAngle(playerid, Angle);
  1008. BarricadeInfo[10][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1009. BarricadeInfo[10][barricadeExist10] = 1;
  1010. }
  1011. else if(BarricadeInfo[10][barricadeExist10] == 1)
  1012. {
  1013. DestroyObject(BarricadeInfo[10][barricadeID]);
  1014. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1015. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1016. GetPlayerFacingAngle(playerid, Angle);
  1017. BarricadeInfo[10][barricadeID] = CreateObject(1434, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1018. BarricadeInfo[10][barricadeExist10] = 1;
  1019. }
  1020. }
  1021. case 1:
  1022. {
  1023. if(BarricadeInfo[10][barricadeExist10] == 0)
  1024. {
  1025. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1026. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1027. GetPlayerFacingAngle(playerid, Angle);
  1028. BarricadeInfo[10][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1029. BarricadeInfo[10][barricadeExist10] = 1;
  1030. }
  1031. else if(BarricadeInfo[10][barricadeExist10] == 1)
  1032. {
  1033. DestroyObject(BarricadeInfo[10][barricadeID]);
  1034. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1035. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1036. GetPlayerFacingAngle(playerid, Angle);
  1037. BarricadeInfo[10][barricadeID] = CreateObject(1425, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1038. BarricadeInfo[10][barricadeExist10] = 1;
  1039. }
  1040. }
  1041. case 2:
  1042. {
  1043. if(BarricadeInfo[10][barricadeExist10] == 0)
  1044. {
  1045. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1046. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1047. GetPlayerFacingAngle(playerid, Angle);
  1048. BarricadeInfo[10][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1049. BarricadeInfo[10][barricadeExist10] = 1;
  1050. }
  1051. else if(BarricadeInfo[10][barricadeExist10] == 1)
  1052. {
  1053. DestroyObject(BarricadeInfo[10][barricadeID]);
  1054. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1055. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1056. GetPlayerFacingAngle(playerid, Angle);
  1057. BarricadeInfo[10][barricadeID] = CreateObject(981, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1058. BarricadeInfo[10][barricadeExist10] = 1;
  1059. }
  1060. }
  1061. case 3:
  1062. {
  1063. if(BarricadeInfo[10][barricadeExist10] == 0)
  1064. {
  1065. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1066. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1067. GetPlayerFacingAngle(playerid, Angle);
  1068. BarricadeInfo[10][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1069. BarricadeInfo[10][barricadeExist10] = 1;
  1070. }
  1071. else if(BarricadeInfo[10][barricadeExist10] == 1)
  1072. {
  1073. DestroyObject(BarricadeInfo[10][barricadeID]);
  1074. new Float:PosX, Float:PosY, Float:PosZ, Float:Angle;
  1075. GetPlayerPos(playerid, PosX, PosY, PosZ);
  1076. GetPlayerFacingAngle(playerid, Angle);
  1077. BarricadeInfo[10][barricadeID] = CreateObject(1238, PosX, PosY, PosZ - 0.52, 0.0, 0.0, Angle);
  1078. BarricadeInfo[10][barricadeExist10] = 1;
  1079. }
  1080. }
  1081. }
  1082. }
  1083. return 1;
  1084. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement