[FilterScript] Fightstyle Changer
#1

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!
Reply
#2

Hmmm. No. This is very easy.
Reply
#3

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.
Reply
#4

Learn script first then script something awesome!
Reply
#5

Not Bad
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)