[HELP] Fight Styles command
#2

PHP код:
#define FILTERSCRIPT

#if defined FILTERSCRIPT

#include <a_samp>

public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/fstyles"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid3DIALOG_STYLE_LIST"Fighting Style's""Normal\nBoxing\nKungfu\nKneeHead\nGrabKick\nElbow""Change""Cancel");
        return 
true;
    }
    return 
false;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
3:
        {
            if(
response == 1)
            {
                switch(
listitem)
                {
                    case 
0:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_NORMAL);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the Normal fight style! -|");
                    }
                    case 
1:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_BOXING);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the Boxing fight style! -|");
                    }
                    case 
2:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_KUNGFU);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the Kungfu fight style! -|");
                    }
                    case 
3:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_KNEEHEAD);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the KneeHead fight style! -|");
                    }
                    case 
4:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_GRABKICK);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the GrabKick fight style! -|");
                    }
                    case 
5:
                    {
                        
SetPlayerFightingStyle (playeridFIGHT_STYLE_ELBOW);
                        
SendClientMessage(playerid0x00FF00"|- You have changed your fighting style to the Elbow fight style! -|");
                    }
                }
            }
        }
    }
    return 
true;
}

#endif 
first dialogid affter response last listitem and command in OnPlayerCommandText.
Reply


Messages In This Thread
[HELP] Fight Styles command - by XYZero - 07.03.2015, 11:46
Respuesta: [HELP] Fight Styles command - by JuanStone - 07.03.2015, 11:56
Re: [HELP] Fight Styles command - by XYZero - 07.03.2015, 12:16
Re: [HELP] Fight Styles command - by ReD_HunTeR - 07.03.2015, 12:24
Re: [HELP] Fight Styles command - by Karan007 - 07.03.2015, 12:37
Re: [HELP] Fight Styles command - by XYZero - 07.03.2015, 13:07
Re: [HELP] Fight Styles command - by Karan007 - 07.03.2015, 13:09
Re: [HELP] Fight Styles command - by M4D - 07.03.2015, 13:10
Re: [HELP] Fight Styles command - by ReD_HunTeR - 07.03.2015, 13:11
Re: [HELP] Fight Styles command - by J0sh... - 11.09.2015, 12:33

Forum Jump:


Users browsing this thread: 1 Guest(s)