Guest User

Untitled

a guest
Oct 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.62 KB | None | 0 0
  1. / Weapons Menu By Etch
  2. #include <a_samp>
  3. #define COLOR_YELLOW 0xFFFF00AA
  4. #if defined FILTERSCRIPT
  5.  
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. print("\n--------------------------------------");
  10. print(" Armi menu caricato");
  11. print("--------------------------------------\n");
  12. return 1;
  13. }
  14.  
  15. public OnFilterScriptExit()
  16. {
  17. print("\n--------------------------------------");
  18. print("Armi menu chiuso");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27. }
  28.  
  29. #endif
  30.  
  31.  
  32. public OnPlayerCommandText(playerid, cmdtext[])
  33. {
  34. if (strcmp("/Armi", cmdtext, true, 10) == 0)
  35. {
  36. ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "Armi", "Pistole\nEquipaggiamenti\nFucili 1\nSMG - Minigun\nFucili 2\nLanciarazzi\nExtra", "Seleziona", "Esci");
  37. return 1;
  38. }
  39. return 0;
  40. }
  41.  
  42. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  43. {
  44. if(dialogid == 999 && response)
  45. {
  46. switch(listitem)
  47. {
  48. case 0:
  49. {
  50. ShowPlayerDialog(playerid, 998, DIALOG_STYLE_LIST, "Pistole", "9mm\n9mm Silenced\nDesert Eagle", "Compra", "Indietro");
  51. }
  52. case 1:
  53. {
  54. ShowPlayerDialog(playerid, 997, DIALOG_STYLE_LIST, "Equipaggiamenti", "Brass Knuckles\nGolf Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nFlowers\nCane\nGrenade\nTear Gas\nMolotov Cocktail", "Compra", "Indietro");
  55. }
  56. case 2:
  57. {
  58. ShowPlayerDialog(playerid, 996, DIALOG_STYLE_LIST, "Fucili 1", "Shotgun\nSawn-off Shotgun\nCombat Shotgun", "Compra", "Indietro");
  59. }
  60. case 3:
  61. {
  62. ShowPlayerDialog(playerid, 995, DIALOG_STYLE_LIST, "SMG - Miniguns", "Micro SMG\nSMG\nAK47\nM4\nTec9\nMinigun", "Compra", "Indietro");
  63. }
  64. case 4:
  65. {
  66. ShowPlayerDialog(playerid, 994, DIALOG_STYLE_LIST, "Fucili 2", "Country Rifle\nSniper Rifle", "Compra", "Indietro");
  67. }
  68. case 5:
  69. {
  70. ShowPlayerDialog(playerid, 993, DIALOG_STYLE_LIST, "Lanciarazzi", "Rocket Launcher\nHeat Seeker Rocket\nFlame Thrower", "Compra", "Indietro");
  71. }
  72. case 6:
  73. {
  74. ShowPlayerDialog(playerid, 992, DIALOG_STYLE_LIST, "Extra", "Satchel Charge\nSpray Can\nFire Extinguisher\nCamera\nNightvision Googles\nThermal Googles\nParachute", "Compra", "Indietro");
  75. }
  76. }
  77. }
  78. if(dialogid == 998 && response) // pistole
  79. {
  80. switch(listitem)
  81. {
  82. case 0:
  83. {
  84. GivePlayerWeapon(playerid,22,99999);
  85. SendClientMessage(playerid,COLOR_YELLOW,"Hai comprato una 9mm");
  86.  
  87. }
  88. case 1:
  89. {
  90. GivePlayerWeapon(playerid,23,99999);
  91. SendClientMessage(playerid,COLOR_YELLOW,"Hai comprato una 9mm silenziata");
  92. }
  93. case 2:
  94. {
  95. GivePlayerWeapon(playerid,24,99999);
  96. SendClientMessage(playerid,COLOR_YELLOW,"Hai comprato una 9mm silenziata");
  97. }
  98. }
  99. }
  100. if(dialogid == 997 && response) // equipaggiamenti
  101. {
  102. switch(listitem)
  103. {
  104. case 0:
  105. {
  106. GivePlayerWeapon(playerid,1,99999);
  107.  
  108. }
  109. case 1:
  110. {
  111. GivePlayerWeapon(playerid,2,99999);
  112. }
  113. case 2:
  114. {
  115. GivePlayerWeapon(playerid,3,99999);
  116. }
  117. case 3:
  118. {
  119. GivePlayerWeapon(playerid,4,99999);
  120. }
  121. case 4:
  122. {
  123. GivePlayerWeapon(playerid,5,99999);
  124. }
  125. case 5:
  126. {
  127. GivePlayerWeapon(playerid,6,99999);
  128. }
  129. case 6:
  130. {
  131. GivePlayerWeapon(playerid,7,99999);
  132. }
  133. case 7:
  134. {
  135. GivePlayerWeapon(playerid,8,99999);
  136. }
  137. case 8:
  138. {
  139. GivePlayerWeapon(playerid,9,99999);
  140. }
  141. case 9:
  142. {
  143. GivePlayerWeapon(playerid,14,99999);
  144. }
  145. case 10:
  146. {
  147. GivePlayerWeapon(playerid,15,99999);
  148. }
  149. case 211:
  150. {
  151. GivePlayerWeapon(playerid,16,99999);
  152. }
  153. case 12:
  154. {
  155. GivePlayerWeapon(playerid,17,99999);
  156. }
  157. case 13:
  158. {
  159. GivePlayerWeapon(playerid,18,99999);
  160. }
  161. }
  162. }
  163. if(dialogid == 996 && response) // Shotguns
  164. {
  165. switch(listitem)
  166. {
  167. case 0:
  168. {
  169. GivePlayerWeapon(playerid,25,99999);
  170.  
  171. }
  172. case 1:
  173. {
  174. GivePlayerWeapon(playerid,26,99999);
  175. }
  176. case 2:
  177. {
  178. GivePlayerWeapon(playerid,27,99999);
  179. }
  180. }
  181. }
  182. if(dialogid == 995 && response) // SMGS - MINIGUNS
  183. {
  184. switch(listitem)
  185. {
  186. case 0:
  187. {
  188. GivePlayerWeapon(playerid,28,99999);
  189.  
  190. }
  191. case 1:
  192. {
  193. GivePlayerWeapon(playerid,29,99999);
  194. }
  195. case 2:
  196. {
  197. GivePlayerWeapon(playerid,30,99999);
  198. }
  199. case 3:
  200. {
  201. GivePlayerWeapon(playerid,31,99999);
  202. }
  203. case 4:
  204. {
  205. GivePlayerWeapon(playerid,32,99999);
  206. }
  207. case 5:
  208. {
  209. GivePlayerWeapon(playerid,38,99999);
  210. }
  211. }
  212. }
  213. if(dialogid == 994 && response) // Rifles
  214. {
  215. switch(listitem)
  216. {
  217. case 0:
  218. {
  219. GivePlayerWeapon(playerid,33,99999);
  220.  
  221. }
  222. case 1:
  223. {
  224. GivePlayerWeapon(playerid,34,99999);
  225. }
  226. }
  227. }
  228. if(dialogid == 993 && response) // Launchers
  229. {
  230. switch(listitem)
  231. {
  232. case 0:
  233. {
  234. GivePlayerWeapon(playerid,35,99999);
  235.  
  236. }
  237. case 1:
  238. {
  239. GivePlayerWeapon(playerid,36,99999);
  240. }
  241. case 2:
  242. {
  243. GivePlayerWeapon(playerid,37,99999);
  244. }
  245. }
  246. }
  247. if(dialogid == 992 && response) // extras
  248. {
  249. switch(listitem)
  250. {
  251. case 0:
  252. {
  253. GivePlayerWeapon(playerid,39,99999);
  254.  
  255. }
  256. case 1:
  257. {
  258. GivePlayerWeapon(playerid,41,99999);
  259. }
  260. case 2:
  261. {
  262. GivePlayerWeapon(playerid,42,99999);
  263. }
  264. case 3:
  265. {
  266. GivePlayerWeapon(playerid,43,99999);
  267. }
  268. case 4:
  269. {
  270. GivePlayerWeapon(playerid,44,99999);
  271. }
  272. case 5:
  273. {
  274. GivePlayerWeapon(playerid,45,99999);
  275. }
  276. case 6:
  277. {
  278. GivePlayerWeapon(playerid,46,99999);
  279. }
  280. }
  281. }
  282. return 1;
  283. }
Add Comment
Please, Sign In to add comment