Advertisement
Guest User

Sayaron

a guest
Nov 14th, 2009
2,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.62 KB | None | 0 0
  1.                              //////////////////////////////
  2.                             //Fighting Styles by Sayaron//
  3.                            //////////////////////////////
  4.  
  5. #include <a_samp>
  6.  
  7. #define FILTERSCRIPT
  8.  
  9. #define DIALOGID 5009
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("===========================");
  14.     print("=Sayaron's Fighting Styles=");
  15.     print("===========================");
  16.     return 1;
  17. }
  18.  
  19. public OnPlayerCommandText(playerid, cmdtext[])
  20. {
  21.     if (strcmp("/styles", cmdtext, true, 10) == 0)
  22.     {
  23.         ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Fighting Styles by Sayaron", "Fighting Styles", "Select", "Cancel");
  24.         return 1;
  25.     }
  26.     return 0;
  27. }
  28.  
  29. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  30. {
  31.     if(dialogid == DIALOGID)
  32.     {
  33.         if(response)
  34.         {
  35.             if(listitem == 0)
  36.             {
  37.                 ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Fighting Styles", "Elbow\nBoxing\nGrabkick\nKneehead\nKungfu\nNormal", "Select", "Cancel");
  38.             }
  39.         }
  40.         return 1;
  41.     }
  42.     if(dialogid == DIALOGID+1)
  43.     {
  44.         if(response)
  45.         {
  46.             if(listitem == 0)
  47.             {
  48.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
  49.             }
  50.             if(listitem == 1)
  51.             {
  52.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
  53.             }
  54.             if(listitem == 2)
  55.             {
  56.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
  57.             }
  58.             if(listitem == 3)
  59.             {
  60.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
  61.             }
  62.             if(listitem == 4)
  63.             {
  64.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
  65.             }
  66.             if(listitem == 5)
  67.             {
  68.                 SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
  69.             }
  70.         }
  71.         return 1;
  72.     }
  73.     return 0;
  74.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement