Advertisement
Guest User

Weapons Dialog By Zeal - code

a guest
Dec 28th, 2014
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.58 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #define DIALOGID 2
  4. #define COLOR_RED 0xAA3333AA
  5.  
  6. #include <a_samp>
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n--------------------------------------");
  13.     print(" Weapons Dialog By Zeal");
  14.     print("--------------------------------------\n");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27.     print("\n----------------------------------");
  28.     print("Weapons Dialog By Zeal");
  29.     print("----------------------------------\n");
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34.     return 1;
  35. }
  36.  
  37. #else
  38. #endif
  39.  
  40. public OnPlayerSpawn(playerid)
  41. {
  42.     ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Weapons Packages By Zeal", "Package 1\nPackage 2", "Select", "Exit");
  43.     return 1;
  44. }
  45.  
  46. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  47. {
  48.     if(dialogid == 2)
  49.     {
  50.         if(response)
  51.   {
  52.         new message[256+1];
  53.             if(listitem == 0)
  54.     GivePlayerWeapon(playerid, 28, 5000);
  55.     GivePlayerWeapon(playerid, 26, 5000);
  56.     GivePlayerWeapon(playerid, 30, 5000);
  57.     GivePlayerWeapon(playerid, 24, 5000);
  58.     SendClientMessage(playerid, COLOR_RED, "You picked Package 1 - Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.");
  59.         }
  60.         if(listitem == 1)
  61.         {
  62.     GivePlayerWeapon(playerid, 29, 5000);
  63.     GivePlayerWeapon(playerid, 31, 5000);
  64.     GivePlayerWeapon(playerid, 34, 5000);
  65.     GivePlayerWeapon(playerid, 25, 5000);
  66.     SendClientMessage(playerid, COLOR_RED, "You picked Package 2 - MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets ");
  67.         }
  68.         return 1;
  69.     }
  70.     return 0;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement