Dialog help
#2

You need to split it up....

so you do:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp, "/Fightstyle", cmdtext, true)
    {
        ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Fighting Styles", "Elbow\nBoxing\nGrabkick\nKneehead\nKungfu\nNormal", "Select", "Cancel");
        return 1;
    }
}
Then you can do

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
}
	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;
}
Or something like that

If not try my tutorial. and begin from scratch
http://forum.sa-mp.com/index.php?topic=134698.0
Reply


Messages In This Thread
Dialog help - by WardenCS - 29.11.2009, 12:19
Re: Dialog help - by Niixie - 29.11.2009, 12:30
Re: Dialog help - by WardenCS - 29.11.2009, 12:34
Re: Dialog help - by Niixie - 29.11.2009, 12:35
Re: Dialog help - by WardenCS - 29.11.2009, 12:39
Re: Dialog help - by Niixie - 29.11.2009, 12:41
Re: Dialog help - by WardenCS - 29.11.2009, 12:44
Re: Dialog help - by Niixie - 29.11.2009, 13:20
Re: Dialog help - by WardenCS - 29.11.2009, 13:45
Re: Dialog help - by [NYRP]Mike. - 29.11.2009, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)