Advertisement
proSeryoga

Weapon Menu BETA

Mar 17th, 2013
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.48 KB | None | 0 0
  1. /*
  2.         FileScript name: Weapon name.
  3.         Аuthor: proSeryoga
  4.         Date: 17.03.2013
  5. */
  6.  
  7. #include <a_samp>
  8. #include <Selection>
  9. #define PREV_BG_COLOR2 0xFFFF00AA
  10. #define DIALOG_BG_COLOR 0x4A5A6BBB
  11. #define PREV_BG_COLOR 0x88888899
  12.  
  13. new gun = mS_INVALID_LISTID;
  14.  
  15. public OnFilterScriptInit()
  16. {
  17.     print("Loading....");
  18.     gun = LoadModelSelectionMenu("gunmenu.txt");
  19.     print("Weapon Menu loaded!");
  20.     return 1;
  21. }
  22.  
  23. public OnPlayerCommandText(playerid, cmdtext[])
  24. {
  25.     if(strcmp(cmdtext, "/gun", true) == 0)
  26.     {
  27.         ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  28.         return 1;
  29.     }
  30.     return 0;
  31. }
  32.  
  33. public OnPlayerModelSelection(playerid, response, listid, modelid)
  34. {
  35.     if(listid == gun)
  36.     {
  37.         if(response)
  38.         {
  39.             switch(modelid)
  40.             {
  41.             case 346:
  42.                 {
  43.                     if(GetPlayerMoney(playerid) <200) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
  44.                     GivePlayerMoney(playerid, -200), GivePlayerWeapon(playerid, 22, 30);
  45.                     GameTextForPlayer(playerid, "~r~9 mm", 200, 1);
  46.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  47.                 }
  48.             case 347:
  49.                 {
  50.                     if(GetPlayerMoney(playerid) <600) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
  51.                     GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 23, 30), GameTextForPlayer(playerid, "~r~Silinced 9mm", 200, 1);
  52.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  53.                 }
  54.             case 348:
  55.                 {
  56.                     if(GetPlayerMoney(playerid) <1200) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
  57.                     GivePlayerMoney(playerid, -1200), GivePlayerWeapon(playerid, 24, 30), GameTextForPlayer(playerid, "~r~Desert Eagle", 200, 1);
  58.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  59.                 }
  60.             case 372:
  61.                 {
  62.                     if(GetPlayerMoney(playerid) <300) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
  63.                     GivePlayerMoney(playerid, -300), GivePlayerWeapon(playerid, 32, 30), GameTextForPlayer(playerid, "~r~TEC-9", 200, 1);
  64.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  65.                 }
  66.             case 352:
  67.                 {
  68.                     if(GetPlayerMoney(playerid) <500) return GameTextForPlayer(playerid, "~r~ No Money", 200, 1);
  69.                     GivePlayerMoney(playerid, -500), GivePlayerWeapon(playerid, 28, 30), GameTextForPlayer(playerid, "~r~Uzi", 200, 1);
  70.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  71.                 }
  72.             case 349:
  73.                 {
  74.                     if(GetPlayerMoney(playerid) <600) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  75.                     GivePlayerMoney(playerid, -600), GivePlayerWeapon(playerid, 25, 15), GameTextForPlayer(playerid, "~r~Shotgun", 200, 1);
  76.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  77.                 }
  78.             case 350:
  79.                 {
  80.                     if(GetPlayerMoney(playerid) <800) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  81.                     GivePlayerMoney(playerid, -800), GivePlayerWeapon(playerid, 26, 15), GameTextForPlayer(playerid, "~r~Sawnoff Shotgun", 200, 1);
  82.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  83.                 }
  84.             case 351:
  85.                 {
  86.                     if(GetPlayerMoney(playerid) <1000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  87.                     GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 27, 15), GameTextForPlayer(playerid, "~r~Combat Shotgun", 200, 1);
  88.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  89.                 }
  90.             case 353:
  91.                 {
  92.                     if(GetPlayerMoney(playerid) <2000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  93.                     GivePlayerMoney(playerid, -2000), GivePlayerWeapon(playerid, 29, 30), GameTextForPlayer(playerid, "~r~MP5", 200, 1);
  94.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  95.                 }
  96.             case 355:
  97.                 {
  98.                     if(GetPlayerMoney(playerid) <3500) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  99.                     GivePlayerMoney(playerid, -3500), GivePlayerWeapon(playerid, 30, 120), GameTextForPlayer(playerid, "~r~AK-47", 200, 1);
  100.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  101.                 }
  102.             case 356:
  103.                 {
  104.                     if(GetPlayerMoney(playerid) <4500) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  105.                     GivePlayerMoney(playerid, -4500), GivePlayerWeapon(playerid, 31, 120), GameTextForPlayer(playerid, "~r~M4", 200, 1);
  106.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  107.                 }
  108.             case 357:
  109.                 {
  110.                     if(GetPlayerMoney(playerid) <1000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  111.                     GivePlayerMoney(playerid, -1000), GivePlayerWeapon(playerid, 33, 20), GameTextForPlayer(playerid, "~r~Country Rifle", 200, 1);
  112.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  113.                 }
  114.             case 358:
  115.                 {
  116.                     if(GetPlayerMoney(playerid) <5000) return GameTextForPlayer(playerid, "~r~No Money", 200, 1);
  117.                     GivePlayerMoney(playerid, -5000), GivePlayerWeapon(playerid, 34, 10), GameTextForPlayer(playerid, "~r~Sniper Rifle", 200, 1);
  118.                     ShowModelSelectionMenu(playerid, gun, "Weapons menu", DIALOG_BG_COLOR, PREV_BG_COLOR, PREV_BG_COLOR2);
  119.                 }
  120.             }
  121.         }
  122.         return 1;
  123.     }
  124.     return 1;
  125. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement