SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 05/09/2012, 04:42 PM   #1
Glint
Guest
 
Posts: n/a
Default SetPlayerFightingStyle Question ?

Hello guys Does SetPlayerFightingStyle work or it is just me here check the code
pawn Code:
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 With Quote
Old 05/09/2012, 06:39 PM   #2
Q.I
Gangsta
 
Q.I's Avatar
 
Join Date: Aug 2012
Location: Brasil
Posts: 995
Reputation: 43
Default Re: SetPlayerFightingStyle Question ?

pawn Code:
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);
       
      }
    }
  }
__________________
X
Q.I is offline   Reply With Quote
Old 05/09/2012, 11:22 PM   #3
JustinAn
Huge Clucker
 
Join Date: Apr 2012
Location: Why?
Posts: 233
Reputation: 26
Default Re: SetPlayerFightingStyle Question ?

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SetPlayerFightingStyle Help need. GBLTeam Scripting Help 4 05/01/2012 09:48 PM
SetPlayerFightingStyle Mike_Peterson Help Archive 3 31/07/2010 08:05 AM
[DUV] SetPlayerFightingStyle .-. Kutrhys Português/Portuguese 6 19/07/2010 01:37 AM
SetPlayerFightingStyle bug? MenaceX^ Help Archive 8 21/10/2009 07:07 PM


All times are GMT. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.