Demihawk

Fight Style System

Nov 23rd, 2014
658
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.29 KB | None | 0 0
  1. //Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy
  2.  
  3. #include <a_samp> //Credits to SA-MP Team
  4. #include <zcmd> //Credits to Zeex
  5.  
  6. #define DIALOG_FSTYLES            1143
  7. #define COLOR_YELLOW 0xFFFF00AA
  8. #define  COLOR_RED          0xFF0000C8
  9.  
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n--------------------------------------");
  15.     print(" Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy Loaded");
  16.     print("--------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29.     print("\n----------------------------------");
  30.     print(" Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy");
  31.     print("----------------------------------\n");
  32. }
  33.  
  34. #endif
  35.  
  36. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  37. {
  38.     if(dialogid == DIALOG_FSTYLES)
  39.     {
  40.         if(!response) return 1;
  41.         switch(listitem)
  42.         {
  43.             case 0:
  44.             {
  45.                 if(GetPlayerFightingStyle(playerid) == 4) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  46.                 SetPlayerFightingStyle(playerid, 4);
  47.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Normal");
  48.             }
  49.             case 1:
  50.             {
  51.                 if(GetPlayerFightingStyle(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  52.                 SetPlayerFightingStyle(playerid, 5);
  53.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Boxing");
  54.             }
  55.             case 2:
  56.             {
  57.                 if(GetPlayerFightingStyle(playerid) == 6) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  58.                 SetPlayerFightingStyle(playerid, 6);
  59.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Kung Fu");
  60.             }
  61.             case 3:
  62.             {
  63.                 if(GetPlayerFightingStyle(playerid) == 7) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  64.                 SetPlayerFightingStyle(playerid, 7);
  65.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Knee Head");
  66.             }
  67.             case 4:
  68.             {
  69.                 if(GetPlayerFightingStyle(playerid) == 15) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  70.                 SetPlayerFightingStyle(playerid, 15);
  71.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Grab Kick");
  72.             }
  73.             case 5:
  74.             {
  75.                 if(GetPlayerFightingStyle(playerid) == 16) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
  76.                 SetPlayerFightingStyle(playerid, 16);
  77.                 SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Elbow");
  78.             }
  79.         }
  80.     }
  81.     return 1;
  82. }
  83. CMD:fstyle(playerid,params[])
  84. {
  85.     #pragma unused params
  86.     ShowPlayerDialog(playerid, DIALOG_FSTYLES,DIALOG_STYLE_LIST,"Select a Fighting Style","Boxing\r\nKung Fu\r\nKnee Head\r\nGrab Kick\r\nElbow","Select", "Cancel");
  87.     return 1;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment