SA-MP Forums Archive
[FilterScript] Fightstyle Changer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Fightstyle Changer (/showthread.php?tid=459640)



Fightstyle Changer - xXSPRITEXx - 24.08.2013

Hello SA:MP forums! It's me xXSPRITEXx, and today I am releasing my FightStyle Changer.

This is my second release. It is a very simple script. The command to open the dialog is: /fightstyle

Code:
Code:
if (strcmp("/fightstyle", cmdtext, true, 11) == 0)
	{
		ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "What is it that you want?", "Normal\nBoxing\nKungfu\nKneeHead\nGrabKick\nElbow", "Change", "Cancel");
		return 1;
	}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
    {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
		case 3:// Our dialog!
    	    {
           	switch(listitem)// Checking which listitem was selected
        	{
        	    case 0:// The first item listed
        	    {
        	        SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
    				SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the Normal fight style!");
        	    }
        	    case 1: // The second item listed
        	    {
        	        SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
   					SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the Boxing fight style!");
        	    }
        	    case 2: // The third item listed
        	    {
        	        SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
    				SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the Kungfu fight style!");
        	    }
        	    case 3:
        	    {
        	    	SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
    				SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the KneeHead fight style!");
        		}
        		case 4:
        		{
					SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
    				SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the GrabKick fight style!");
				}
				case 5:
				{
					SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
    				SendClientMessage(playerid, 0xFFFFFFAA, "You have changed your fighting style to the Elbow fight style!");
				}
			}
			}
		}
	}

 			return 1;
}
Hope you like it!


Re: Fightstyle Changer - xganyx - 24.08.2013

Hmmm. No. This is very easy.


Re: Fightstyle Changer - xXSPRITEXx - 24.08.2013

Quote:
Originally Posted by xganyx
View Post
Hmmm. No. This is very easy.
I understand, but I am new to PAWN scripting. So I am still trying to learn. Sorry that is doesn't suit your needs/wants.


Re: Fightstyle Changer - xganyx - 24.08.2013

Learn script first then script something awesome!


Re: Fightstyle Changer - Inn0cent - 24.08.2013

Not Bad