SHARE
TWEET

Weapon System

a guest May 25th, 2013 480 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*==================================INCLUDES==================================*/
  2. #include <a_samp>
  3. #include <zcmd>
  4. /*==================================DEFINES===================================*/
  5. #define FILTERSCRIPT
  6.  
  7. #define COLOR_RED         0xFF0000C8
  8. #define COLOR_GREEN       0x09F709C8
  9.  
  10. #define WEAPONS_DIALOG    1
  11. /*==================================PUBLICS===================================*/
  12. public OnFilterScriptInit()
  13. {
  14.         print("\n--------------------------------------");
  15.         print(" Areax's Weapon System loaded!");
  16.         print("--------------------------------------\n");
  17.        
  18.  
  19.         return 1;
  20. }
  21.  
  22. public OnFilterScriptExit()
  23. {
  24.         return 1;
  25. }
  26.  
  27. main()
  28. {
  29.         print("\n----------------------------------");
  30.         print(" Areax's Weapon System Unloaded!");
  31.         print("----------------------------------\n");
  32. }
  33.  
  34. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  35. {
  36. if(dialogid == 1)
  37. {
  38. if(!response) return SendClientMessage(playerid, COLOR_RED, "*You Canceled!*");
  39. switch(listitem)
  40. {
  41.     case 0:
  42.     {
  43.     if(GetPlayerMoney(playerid) > 500 )
  44.     {
  45.     GivePlayerMoney(playerid, -500);
  46.     GivePlayerWeapon(playerid, 22, 500);
  47.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a 9mm with 500 Ammo!*");
  48.     }
  49.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  50.     }
  51.     case 1:
  52.     {
  53.     if(GetPlayerMoney(playerid) > 600 )
  54.     {
  55.     GivePlayerMoney(playerid, -600);
  56.     GivePlayerWeapon(playerid, 23, 500);
  57.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Silenced 9mm with 500 Ammo!*");
  58.     }
  59.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  60.     }
  61.     case 2:
  62.     {
  63.     if(GetPlayerMoney(playerid) > 750 )
  64.     {
  65.     GivePlayerMoney(playerid, -750);
  66.     GivePlayerWeapon(playerid, 24, 500);
  67.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Desert Deagle with 500 Ammo!*");
  68.     }
  69.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  70.     }
  71.     case 3:
  72.     {
  73.     if(GetPlayerMoney(playerid) > 1000 )
  74.     {
  75.     GivePlayerMoney(playerid, -1000);
  76.     GivePlayerWeapon(playerid, 25, 550);
  77.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Shotgun with 550 Ammo!*");
  78.     }
  79.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  80.     }
  81.     case 4:
  82.     {
  83.     if(GetPlayerMoney(playerid) > 1200 )
  84.     {
  85.     GivePlayerMoney(playerid, -1200);
  86.     GivePlayerWeapon(playerid, 26, 550);
  87.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Sawnoff Shotgun with 550 Ammo!*");
  88.     }
  89.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  90.     }
  91.     case 5:
  92.     {
  93.     if(GetPlayerMoney(playerid) > 1000 )
  94.     {
  95.     GivePlayerMoney(playerid, -1000);
  96.     GivePlayerWeapon(playerid, 27, 550);
  97.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Combat Shotgun with 550 Ammo!*");
  98.     }
  99.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  100.     }
  101.     case 6:
  102.     {
  103.     if(GetPlayerMoney(playerid) > 1500 )
  104.     {
  105.     GivePlayerMoney(playerid, -1500);
  106.     GivePlayerWeapon(playerid, 28, 750);
  107.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Micro SMG/Uzi with 750 Ammo!*");
  108.     }
  109.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  110.     }
  111.     case 7:
  112.     {
  113.     if(GetPlayerMoney(playerid) > 1500 )
  114.     {
  115.     GivePlayerMoney(playerid, -1500);
  116.     GivePlayerWeapon(playerid, 32, 750);
  117.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Tec-9 with 750 Ammo!*");
  118.     }
  119.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  120.     }
  121.     case 8:
  122.     {
  123.     if(GetPlayerMoney(playerid) > 1350 )
  124.     {
  125.     GivePlayerMoney(playerid, -1350);
  126.     GivePlayerWeapon(playerid, 29, 750);
  127.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a MP5 with 750 Ammo!*");
  128.     }
  129.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  130.     }
  131.     case 9:
  132.     {
  133.     if(GetPlayerMoney(playerid) > 2000 )
  134.     {
  135.     GivePlayerMoney(playerid, -2000);
  136.     GivePlayerWeapon(playerid, 30, 750);
  137.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a AK-47 with 750 Ammo!*");
  138.     }
  139.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  140.         }
  141.     case 10:
  142.     {
  143.     if(GetPlayerMoney(playerid) > 2000 )
  144.     {
  145.     GivePlayerMoney(playerid, -2000);
  146.     GivePlayerWeapon(playerid, 31, 750);
  147.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a M4 with 750 Ammo!*");
  148.     }
  149.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  150.     }
  151.     case 11:
  152.     {
  153.     if(GetPlayerMoney(playerid) > 2500 )
  154.     {
  155.     GivePlayerMoney(playerid, -2500);
  156.     GivePlayerWeapon(playerid, 34, 50);
  157.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Sniper Rifle with 50 Ammo!*");
  158.     }
  159.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  160.     }
  161.     case 12:
  162.     {
  163.     if(GetPlayerMoney(playerid) > 400 )
  164.     {
  165.     GivePlayerMoney(playerid, -400);
  166.     GivePlayerWeapon(playerid, 46, 1);
  167.     SendClientMessage(playerid, COLOR_GREEN, "*You Bought a Parachute!*");
  168.     }
  169.     else SendClientMessage(playerid, COLOR_RED, "ERROR: You Don't Have Enought Money!");
  170.     }
  171.     }
  172.     }
  173. return 1;
  174. }
  175. /*==================================COMMAND===================================*/
  176. CMD:weapons(playerid, params[])
  177. {
  178.     ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "{35FB04}WEAPONS:","{FFFF00}9mm 500$\nSilenced 9mm 600$\nDesert Eagle 750$\n{B0FB04}Shotgun 1000$\nSawnoff Shotgun 1200$\nCombat Shotgun 1000$\n{20F709}Micro SMG/Uzi 1500$\nTec-9 1500$\nMP5 1350$\n{0DF2F2}AK-47 2000$\nM4 2000$\n{0D0DF2}Sniper Rifle 2500$\n{FB0404}Parachute 400$", "Ok", "Exit");
  179.     return 1;
  180. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top