Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy
- #include <a_samp> //Credits to SA-MP Team
- #include <zcmd> //Credits to Zeex
- #define DIALOG_FSTYLES 1143
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_RED 0xFF0000C8
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy Loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Fight Style System By Demihawk A.K.A Mohammad Yusuf Randy");
- print("----------------------------------\n");
- }
- #endif
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_FSTYLES)
- {
- if(!response) return 1;
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerFightingStyle(playerid) == 4) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 4);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Normal");
- }
- case 1:
- {
- if(GetPlayerFightingStyle(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 5);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Boxing");
- }
- case 2:
- {
- if(GetPlayerFightingStyle(playerid) == 6) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 6);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Kung Fu");
- }
- case 3:
- {
- if(GetPlayerFightingStyle(playerid) == 7) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 7);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Knee Head");
- }
- case 4:
- {
- if(GetPlayerFightingStyle(playerid) == 15) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 15);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Grab Kick");
- }
- case 5:
- {
- if(GetPlayerFightingStyle(playerid) == 16) return SendClientMessage(playerid, COLOR_RED, "[Error]: You're already using this fighting style!");
- SetPlayerFightingStyle(playerid, 16);
- SendClientMessage(playerid, COLOR_YELLOW, "[FStyle]: You change your fighting style to: Elbow");
- }
- }
- }
- return 1;
- }
- CMD:fstyle(playerid,params[])
- {
- #pragma unused params
- 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");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment