Advertisement
Guest User

FilterScript - Sistema menu de Armas by: SrAlface007

a guest
Jun 14th, 2015
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. #include <a_samp>
  2. #if defined FILTERSCRIPT
  3. #define DIALOG_WEAPONS 3
  4.  
  5. public OnFilterScriptInit()
  6. {
  7. print("\n--------------------------------------");
  8. print(" Sistema menu de armas. Feito por: SrAlface007");
  9. print("--------------------------------------\n");
  10. return 1;
  11. }
  12.  
  13. public OnFilterScriptExit()
  14. {
  15. return 1;
  16. }
  17.  
  18. #else
  19.  
  20. main()
  21. {
  22. print("\n----------------------------------");
  23. print(" Sistema menu de armas. Feito por: SrAlface007");
  24. print("----------------------------------\n");
  25. }
  26.  
  27. #endif
  28.  
  29.  
  30. public OnPlayerCommandText(playerid, cmdtext[])
  31. {
  32. if (strcmp("/marmas", cmdtext, true, 10) == 0)
  33. {
  34. ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Menu de Armas By: SrAlface007", "Desert Eagle\nAK-47\nCombat Shotgun\nKatana\nM4\nParaquedas\nRifle Sniper\nTec-9\nC4\n", "Selecionar", "Fechar");
  35. SendClientMessage(playerid, 0xFF0000FF, "[x] Você entrou no menu de armas >> /marmas <<");
  36. return 1;
  37. }
  38. return 0;
  39. }
  40. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  41. {
  42. if(dialogid == 3)
  43. {
  44. if(response)
  45. {
  46.  
  47. switch(listitem)
  48. {
  49. case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 500);
  50. case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 500);
  51. case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 500);
  52. case 3: GivePlayerWeapon(playerid, WEAPON_KATANA, 8);
  53. case 4: GivePlayerWeapon(playerid, WEAPON_M4, 500);
  54. case 5: GivePlayerWeapon(playerid, WEAPON_PARACHUTE, 500);
  55. case 6: GivePlayerWeapon(playerid, WEAPON_SNIPER, 500);
  56. case 7: GivePlayerWeapon(playerid, WEAPON_TEC9, 500);
  57. case 8: GivePlayerWeapon(playerid, WEAPON_SATCHEL, 500);
  58.  
  59.  
  60. }
  61. }
  62. return 1;
  63. }
  64.  
  65. return 0;
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement