29.11.2009, 12:19
Hello,i got problem with dialog,i wanted to make if ur boxing etc is 1 u can choose the style,but when its not u cant and it says you havent learn it yet! but it wont say it,and if its 1 it wont say anything and wont choose the style,help me thanks heres the dialog
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOGID)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Fighting Styles", "Elbow\nBoxing\nGrabkick\nKneehead\nKungfu\nNormal", "Select", "Cancel");
}
}
return 1;
}
if(dialogid == DIALOGID+1)
{
if(response)
{
if(listitem == 0)
{
if(PlayerInfo[playerid][elbow] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
}
if(listitem == 1)
{
if(PlayerInfo[playerid][Boxing] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
}
if(listitem == 2)
{
if(PlayerInfo[playerid][grabkick] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
}
if(listitem == 3)
{
if(PlayerInfo[playerid][kneehead] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
}
if(listitem == 4)
{
if(PlayerInfo[playerid][KungFu] == 1)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
}
if(listitem == 5)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
}
}
}
}
}
else { SendClientMessage(playerid, COLOR_GREY,"You Havent Learn this Skill!"); }
}
}
return 1;
}
return 0;
}