Guest User

Fighting Styles

a guest
May 2nd, 2011
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2. //----------------------------Fighting-Styles-----------------------------------
  3. //------------------------------------------------------------------------------
  4.  
  5. #include <a_samp>
  6.  
  7. #define MENU 5641
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. print("\n--------------------------------------");
  14. print(" Fighting Styles by Campionull ");
  15. print("--------------------------------------\n");
  16. return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21. return 1;
  22. }
  23.  
  24. #endif
  25.  
  26. public OnPlayerCommandText(playerid, cmdtext[])
  27. {
  28. if (strcmp("/fight", cmdtext, true, 10) == 0)
  29. {
  30. ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Select a Fighting Style","Boxing\r\nKung Fu\r\nKnee Head\r\nGrab Kick\r\nElbow","Select", "Cancel");
  31. return 1;
  32. }
  33. return 0;
  34. }
  35.  
  36. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  37. {
  38. if(dialogid == 1)
  39. {
  40. if(response)
  41. {
  42. if(listitem == 0)
  43. {
  44. SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
  45. }
  46. if(listitem == 1)
  47. {
  48. SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
  49. }
  50. if(listitem == 2)
  51. {
  52. SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
  53. }
  54. if(listitem == 3)
  55. {
  56. SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
  57. }
  58. if(listitem == 4)
  59. {
  60. SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
  61. }
  62. }
  63. }
  64.  
  65. if(dialogid == 1)
  66. {
  67. if(!response)
  68. {
  69. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Select a Fighting Style","Boxing\r\nKung Fu\r\nKnee Head\r\nGrab Kick\r\nElbow","Select", "Cancel");
  70. }
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment