Dialog problem
#1

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid==1)
	{
		if(response)
		{
		  SendClientMessage(playerid, COLOR_RED, "You have clicked 'Accept' so you accept the rules!");
		}
		}
		else
		{
		  SendClientMessage(playerid, COLOR_RED, "You have clicked 'Decline' so you don't accept the rules!");
		  Kick(playerid);
		}
		return 1;
}
I have this, when I click Accept it shows me with red and when I click Decline it doesen't send me any message.Why?
Reply
#2

only one single } was on the wrong place. this should fix it:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid==1)
	{
		if(response)
		{
			SendClientMessage(playerid, COLOR_RED, "You have clicked 'Accept' so you accept the rules!");
		}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "You have clicked 'Decline' so you don't accept the rules!");
			Kick(playerid);
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)