SetPlayerFightingStyle Question ?
#1

Hello guys Does SetPlayerFightingStyle work or it is just me here check the code
pawn Код:
case DIALOG_DUEL_BOXING:
        {
            if(response)
            {
                if(listitem == 0)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Normal{FFFFFF} Fighting Style");
                }
                else if(listitem == 1)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Boxing{FFFFFF} Fighting Style");
                }
                else if(listitem == 2)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Kung Fu{FFFFFF} Fighting Style");
                }
                else if(listitem == 3)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Kneehead{FFFFFF} Fighting Style");
                }
                else if(listitem == 4)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Grab Kick{FFFFFF} Fighting Style");
                }
                else if(listitem == 5)
                {
                    SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
                    SendClientMessage(playerid, -1, "{FFFF00}D-DM : {FFFFFF}You Have Selected The {FF0000}Elbow{FFFFFF} Fighting Style");
                }
            }
        }
what is the problem with it, when i change the fighting style, the style is the same.
Reply
#2

pawn Код:
example:

CMD:fight(playerid)
{
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "FIGHTING STYLES", "{FFFFFF} ", "Ok", "Cancel");
        return 1;
}




if (dialogid == 2) {
    if (response) {
      if (listitem == 0) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
     
      }
      if (listitem == 1) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
       
      }
      if (listitem == 2) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
       
      }
      if (listitem == 3) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
       
      }
      if (listitem == 4) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
       
      }
      if (listitem == 5) {
        SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
       
      }
    }
  }
Reply
#3

If you didn't add a 'return 0;' at the ending of 'OnDialogResponse' you better should, that might fix it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)