Guest User

Fight Styles

a guest
Nov 23rd, 2011
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #include <a_samp>
  2. #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
  3. public OnPlayerCommandText(playerid, cmdtext[]){dcmd(fightstyle, 12, cmdtext);return 0;}
  4. dcmd_fightstyle(playerid, params[]) {
  5. #pragma unused params
  6. ShowPlayerDialog(playerid, 111111, DIALOG_STYLE_LIST, "Fighting Style's","FIGHT_STYLE_NORMAL\nFIGHT_STYLE_BOXING\nFIGHT_STYLE_KUNGFU\nFIGHT_STYLE_KNEEHEAD\nFIGHT_STYLE_GRABKICK\nFIGHT_STYLE_ELBOW", "Select", "Cancel");return 1;}
  7. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  8. {
  9. if(dialogid == 111111 && response)
  10. {
  11. switch(listitem)
  12. {
  13. case 0: SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
  14. case 1: SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
  15. case 2: SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
  16. case 3: SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
  17. case 4: SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
  18. case 5: SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
  19. }
  20. return 1;
  21. }
  22. return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment