Advertisement
Guest User

wepshop

a guest
Apr 16th, 2016
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.38 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4.  
  5. #define DIALOG_MELEE 9
  6. #define DIALOG_PISTOL 10
  7. #define DIALOG_SHOTGUNS 11
  8. #define DIALOG_SMG 12
  9. #define DIALOG_ARIF 13
  10. #define DIALOG_RIF 14
  11. #define DIALOG_MISC 15
  12. #define WMENU 17
  13.  
  14. #define COLOR_RED 0xFF0000AA
  15. #define COLOR_GREEN 0x00FF00AA
  16.  
  17.  
  18. public OnFilterScriptInit()
  19. {
  20.  
  21. print("\n-----------------------------------");
  22. print(" WepShop -- Created by Charlie(Cylano");
  23. print("-----------------------------------\n");
  24. return 1;
  25. }
  26.  
  27. public OnPlayerCommandText(playerid, cmdtext[])
  28. {
  29. if(strcmp("/wshop", cmdtext, true, 10) == 0)
  30. {
  31. ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net",
  32. "Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc",
  33. "Select", "Cancel");
  34. return 1;
  35. }
  36. return 0;
  37. }
  38.  
  39.  
  40. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  41. {
  42. if(dialogid == 17)
  43. {
  44. if(response)
  45. {
  46. switch(listitem)
  47. {
  48. case 0:
  49. {
  50. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  51. "Weapon\tPrice\n\
  52. Knife\t$100\n\
  53. Bat\t$100\n\
  54. Nightstick\t$100\n\
  55. Pool Cue\t$100\n\
  56. Katana\t$150\n\
  57. Chainsaw\t$1000",
  58. "Select", "Back");
  59. return 1;
  60. }
  61. case 1:
  62. {
  63. ShowPlayerDialog(playerid, 10, DIALOG_STYLE_TABLIST_HEADERS, "Pistols",
  64. "Weapon\tPrice\tAmmo\n\
  65. Colt .45\t$200\t100\n\
  66. Silenced Pistol\t$600\t100\n\
  67. Desert Eagle\t$1200\t100",
  68. "Select", "Back");
  69. return 1;
  70. }
  71. case 2:
  72. {
  73. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_TABLIST_HEADERS, "Shotguns",
  74. "Weapon\tPrice\tAmmo\n\
  75. Pump-Action Shotgun\t$600\t20\n\
  76. Sawn-off Shotgun\t$800\t20\n\
  77. Combat Shotgun\t$1000\t20",
  78. "Select", "Back");
  79. return 1;
  80. }
  81. case 3:
  82. {
  83. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_TABLIST_HEADERS, "SMGs",
  84. "Weapon\tPrice\tAmmo\n\
  85. Tec-9\t$300\t100\n\
  86. Micro-Uzi\t$500\t100\n\
  87. MP5\t$2500\t150",
  88. "Select", "Back");
  89. return 1;
  90. }
  91. case 4:
  92. {
  93. ShowPlayerDialog(playerid, 13, DIALOG_STYLE_TABLIST_HEADERS, "Assault Rifles",
  94. "Weapon\tPrice\tAmmo\n\
  95. AK-47\t$3500\t250\n\
  96. M4\t$4500\t250",
  97. "Select", "Back");
  98. return 1;
  99. }
  100. case 5:
  101. {
  102. ShowPlayerDialog(playerid, 14, DIALOG_STYLE_TABLIST_HEADERS, "Rifles",
  103. "Weapon\tPrice\tAmmo\n\
  104. Country Rifle\t$1000\t20\n\
  105. Sniper Rifle\t$5000\t20",
  106. "Select", "Back");
  107. return 1;
  108. }
  109. case 6:
  110. {
  111. ShowPlayerDialog(playerid, 15, DIALOG_STYLE_TABLIST_HEADERS, "Misc",
  112. "Weapon\tPrice\n\
  113. Parachute\t$500",
  114. "Select", "Back");
  115. return 1;
  116. }
  117. }
  118. }
  119. }
  120. if(dialogid == 9)
  121. {
  122. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  123. if(response)
  124. {
  125. switch(listitem)
  126. {
  127. case 0:
  128. {
  129. if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  130. GivePlayerMoney(playerid, -100), GivePlayerWeapon(playerid, 4, 1);
  131. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Knife");
  132. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  133. "Weapon\tPrice\n\
  134. Knife\t$100\n\
  135. Bat\t$100\n\
  136. Nightstick\t$100\n\
  137. Pool Cue\t$100\n\
  138. Katana\t$150\n\
  139. Chainsaw\t$1000",
  140. "Select", "Back");
  141. return 1;
  142. }
  143. case 1:
  144. {
  145. if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  146. GivePlayerMoney(playerid, -100), GivePlayerWeapon(playerid, 5, 1);
  147. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Bat");
  148. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  149. "Weapon\tPrice\n\
  150. Knife\t$100\n\
  151. Bat\t$100\n\
  152. Nightstick\t$100\n\
  153. Pool Cue\t$100\n\
  154. Katana\t$150\n\
  155. Chainsaw\t$1000",
  156. "Select", "Back");
  157. return 1;
  158. }
  159. case 2:
  160. {
  161. if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  162. GivePlayerMoney(playerid, -100), GivePlayerWeapon(playerid, 3, 1);
  163. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Nightstick");
  164. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  165. "Weapon\tPrice\n\
  166. Knife\t$100\n\
  167. Bat\t$100\n\
  168. Nightstick\t$100\n\
  169. Pool Cue\t$100\n\
  170. Katana\t$150\n\
  171. Chainsaw\t$1000",
  172. "Select", "Back");
  173. return 1;
  174. }
  175. case 3:
  176. {
  177. if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  178. GivePlayerMoney(playerid, -100), GivePlayerWeapon(playerid,7, 1);
  179. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Pool Cue");
  180. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  181. "Weapon\tPrice\n\
  182. Knife\t$100\n\
  183. Bat\t$100\n\
  184. Nightstick\t$100\n\
  185. Pool Cue\t$100\n\
  186. Katana\t$150\n\
  187. Chainsaw\t$1000",
  188. "Select", "Back");
  189. return 1;
  190. }
  191. case 4:
  192. {
  193. if(GetPlayerMoney(playerid) <150) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  194. GivePlayerMoney(playerid, -150), GivePlayerWeapon(playerid, 8, 1);
  195. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Katana");
  196. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  197. "Weapon\tPrice\n\
  198. Knife\t$100\n\
  199. Bat\t$100\n\
  200. Nightstick\t$100\n\
  201. Pool Cue\t$100\n\
  202. Katana\t$150\n\
  203. Chainsaw\t$1000",
  204. "Select", "Back");
  205. return 1;
  206. }
  207. case 5:
  208. {
  209. if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  210. GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 9, 1);
  211. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Chainsaw");
  212. ShowPlayerDialog(playerid, 9, DIALOG_STYLE_TABLIST_HEADERS, "Melee",
  213. "Weapon\tPrice\n\
  214. Knife\t$100\n\
  215. Bat\t$100\n\
  216. Nightstick\t$100\n\
  217. Pool Cue\t$100\n\
  218. Katana\t$150\n\
  219. Chainsaw\t$1000",
  220. "Select", "Back");
  221. return 1;
  222. }
  223. }
  224. }
  225. }
  226. if(dialogid == 10)
  227. {
  228. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  229. if(response)
  230. {
  231. switch(listitem)
  232. {
  233. case 0:
  234. {
  235. if(GetPlayerMoney(playerid) <200) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  236. GivePlayerMoney(playerid, -200), GivePlayerWeapon(playerid, 22, 100);
  237. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Colt .45");
  238. ShowPlayerDialog(playerid, 10, DIALOG_STYLE_TABLIST_HEADERS, "Pistols",
  239. "Weapon\tPrice\tAmmo\n\
  240. Colt .45\t$200\t100\n\
  241. Silenced Pistol\t$600\t100\n\
  242. Desert Eagle\t$1200\t100",
  243. "Select", "Back");
  244. return 1;
  245. }
  246. case 1:
  247. {
  248. if(GetPlayerMoney(playerid) <600) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  249. GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 23, 100);
  250. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Silenced Pistol");
  251. ShowPlayerDialog(playerid, 10, DIALOG_STYLE_TABLIST_HEADERS, "Pistols",
  252. "Weapon\tPrice\tAmmo\n\
  253. Colt .45\t$200\t100\n\
  254. Silenced Pistol\t$600\t100\n\
  255. Desert Eagle\t$1200\t100",
  256. "Select", "Back");
  257. return 1;
  258. }
  259. case 2:
  260. {
  261. if(GetPlayerMoney(playerid) <1200) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  262. GivePlayerMoney(playerid, -1200), GivePlayerWeapon(playerid, 24, 100);
  263. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Desert Eagle");
  264. ShowPlayerDialog(playerid, 10, DIALOG_STYLE_TABLIST_HEADERS, "Pistols",
  265. "Weapon\tPrice\tAmmo\n\
  266. Colt .45\t$200\t100\n\
  267. Silenced Pistol\t$600\t100\n\
  268. Desert Eagle\t$1200\t100",
  269. "Select", "Back");
  270. return 1;
  271. }
  272. }
  273. }
  274. }
  275. if(dialogid == 11)
  276. {
  277. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  278. if(response)
  279. {
  280. switch(listitem)
  281. {
  282. case 0:
  283. {
  284. if(GetPlayerMoney(playerid) <600) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  285. GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 25, 20);
  286. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Pump-Action Shotgun");
  287. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_TABLIST_HEADERS, "Shotguns",
  288. "Weapon\tPrice\tAmmo\n\
  289. Pump-Action Shotgun\t$600\t20\n\
  290. Sawn-off Shotgun\t$800\t20\n\
  291. Combat Shotgun\t$1000\t20",
  292. "Select", "Back");
  293. return 1;
  294. }
  295. case 1:
  296. {
  297. if(GetPlayerMoney(playerid) <800) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  298. GivePlayerMoney(playerid, -800), GivePlayerWeapon(playerid, 26, 20);
  299. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Sawn-off Shotgun");
  300. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_TABLIST_HEADERS, "Shotguns",
  301. "Weapon\tPrice\tAmmo\n\
  302. Pump-Action Shotgun\t$600\t20\n\
  303. Sawn-off Shotgun\t$800\t20\n\
  304. Combat Shotgun\t$1000\t20",
  305. "Select", "Back");
  306. return 1;
  307. }
  308. case 2:
  309. {
  310. if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  311. GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 27, 20);
  312. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Combat Shotgun");
  313. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_TABLIST_HEADERS, "Shotguns",
  314. "Weapon\tPrice\tAmmo\n\
  315. Pump-Action Shotgun\t$600\t20\n\
  316. Sawn-off Shotgun\t$800\t20\n\
  317. Combat Shotgun\t$1000\t20",
  318. "Select", "Back");
  319. return 1;
  320. }
  321. }
  322. }
  323. }
  324. if(dialogid == 12)
  325. {
  326. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  327. if(response)
  328. {
  329. switch(listitem)
  330. {
  331. case 0:
  332. {
  333. if(GetPlayerMoney(playerid) <300) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  334. GivePlayerMoney(playerid, -300), GivePlayerWeapon(playerid, 32, 100);
  335. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Tec-9");
  336. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_TABLIST_HEADERS, "SMGs",
  337. "Weapon\tPrice\tAmmo\n\
  338. Tec-9\t$300\t100\n\
  339. Micro-Uzi\t$500\t100\n\
  340. MP5\t$2500\t150",
  341. "Select", "Back");
  342. return 1;
  343. }
  344. case 1:
  345. {
  346. if(GetPlayerMoney(playerid) <500) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  347. GivePlayerMoney(playerid, -500), GivePlayerWeapon(playerid, 28, 100);
  348. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Micro-Uzi");
  349. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_TABLIST_HEADERS, "SMGs",
  350. "Weapon\tPrice\tAmmo\n\
  351. Tec-9\t$300\t100\n\
  352. Micro-Uzi\t$500\t100\n\
  353. MP5\t$2500\t150",
  354. "Select", "Back");
  355. return 1;
  356. }
  357. case 2:
  358. {
  359. if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  360. GivePlayerMoney(playerid, -2500), GivePlayerWeapon(playerid, 29, 150);
  361. SendClientMessage(playerid, COLOR_GREEN, "Purchased: MP5");
  362. ShowPlayerDialog(playerid, 12, DIALOG_STYLE_TABLIST_HEADERS, "SMGs",
  363. "Weapon\tPrice\tAmmo\n\
  364. Tec-9\t$300\t100\n\
  365. Micro-Uzi\t$500\t100\n\
  366. MP5\t$2500\t150",
  367. "Select", "Back");
  368. return 1;
  369. }
  370. }
  371. }
  372. }
  373. if(dialogid == 13)
  374. {
  375. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  376. if(response)
  377. {
  378. switch(listitem)
  379. {
  380. case 0:
  381. {
  382. if(GetPlayerMoney(playerid) <3500) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  383. GivePlayerMoney(playerid, -3500), GivePlayerWeapon(playerid, 30, 250);
  384. SendClientMessage(playerid, COLOR_GREEN, "Purchased: AK-47");
  385. ShowPlayerDialog(playerid, 13, DIALOG_STYLE_TABLIST_HEADERS, "Assault Rifles",
  386. "Weapon\tPrice\tAmmo\n\
  387. AK-47\t$3500\t250\n\
  388. M4\t$4500\t250",
  389. "Select", "Back");
  390. return 1;
  391. }
  392. case 1:
  393. {
  394. if(GetPlayerMoney(playerid) <4500) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  395. GivePlayerMoney(playerid, -4500), GivePlayerWeapon(playerid, 31, 250);
  396. SendClientMessage(playerid, COLOR_GREEN, "Purchased: M4");
  397. ShowPlayerDialog(playerid, 13, DIALOG_STYLE_TABLIST_HEADERS, "Assault Rifles",
  398. "Weapon\tPrice\tAmmo\n\
  399. AK-47\t$3500\t250\n\
  400. M4\t$4500\t250",
  401. "Select", "Back");
  402. return 1;
  403. }
  404. }
  405. }
  406. }
  407. if(dialogid == 14)
  408. {
  409. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  410. if(response)
  411. {
  412. switch(listitem)
  413. {
  414. case 0:
  415. {
  416. if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  417. GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 33, 20);
  418. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Country Rifle");
  419. ShowPlayerDialog(playerid, 14, DIALOG_STYLE_TABLIST_HEADERS, "Rifles",
  420. "Weapon\tPrice\tAmmo\n\
  421. Country Rifle\t$1000\t20\n\
  422. Sniper Rifle\t$5000\t20",
  423. "Select", "Back");
  424. return 1;
  425. }
  426. case 1:
  427. {
  428. if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  429. GivePlayerMoney(playerid, -5000), GivePlayerWeapon(playerid, 34, 20);
  430. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Sniper Rifle");
  431. ShowPlayerDialog(playerid, 14, DIALOG_STYLE_TABLIST_HEADERS, "Rifles",
  432. "Weapon\tPrice\tAmmo\n\
  433. Country Rifle\t$1000\t20\n\
  434. Sniper Rifle\t$5000\t20",
  435. "Select", "Back");
  436. return 1;
  437. }
  438. }
  439. }
  440. }
  441. if(dialogid == 15)
  442. {
  443. if(!response) return ShowPlayerDialog(playerid, 17, DIALOG_STYLE_LIST, "www.ammunation.org.uk.net","Melee\nPistols\nShotguns\nSMGs\nAssault Rifles\nRifles\nMisc","Select", "Cancel");
  444. if(response)
  445. {
  446. switch(listitem)
  447. {
  448. case 0:
  449. {
  450. if(GetPlayerMoney(playerid) <500) return SendClientMessage(playerid, COLOR_RED, "Not enough cash!");
  451. GivePlayerMoney(playerid, -500), GivePlayerWeapon(playerid, 46, 1);
  452. SendClientMessage(playerid, COLOR_GREEN, "Purchased: Parachute");
  453. ShowPlayerDialog(playerid, 15, DIALOG_STYLE_TABLIST_HEADERS, "Misc",
  454. "Weapon\tPrice\n\
  455. Parachute\t$500",
  456. "Select", "Back");
  457. return 1;
  458. }
  459. }
  460. }
  461. }
  462. return 0;
  463. }
  464.  
  465. public OnFilterScriptExit()
  466. {
  467.  
  468. return 1;
  469. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement