Adding string to dialog?
#1

Hello! I've just started to use dialog, and i made a couple and it went well.

But than i wanted to add a string to the dialog msgbox, but i can't figure out how i add the string as the text instead of text.

i tried with:

Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Members", "string", "Back", "Close");
Код:
  		if(dialogid == 10)
	{
	  if(response)
		{
		  if(listitem == 0)
		  {
		    new name[MAX_PLAYER_NAME],string[128];
   			for(new i=0;i<MAX_PLAYERS;i++)
				{
					if(COP[i] >= 1)
					{
						if(IsPlayerConnected(i))
						{
							GetPlayerName(i,name,sizeof(name));
							format(string,sizeof(string),"%s",name);
							SendClientMessage(playerid, COLOUR_WHITE, string);
							return 1;
						}
						else
						{
				  		ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Police Station", " Join \n Leave \n Members", "Select", "Close");
							return 1;
						}
					}
				}
      }
		}
	}
But that would just show "string" when i open it, and it wont go back to the dialog ID 9..

Can any1 tell me how to add strings?

-Best regards Naxix
Reply
#2

string without ' " ' . Then it must be..
Reply
#3

Like this:
Код:
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Members", string, "Back", "Close");
as string isn't defined there, it will get defined in the Itemlist first??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)