Displaying msg in rows -
Lajko1 - 21.07.2015
Guys I'm saving a string into map with yini. So I'm wondering how can I display tickets that are pending at player in rows.
Now it saves like this:
Tickets = Test1, test2, test3
But I want to display this In game like this:
Your Tickets:
Test1
Test2
Test3
How can I do that?
Re: Displaying msg in rows -
zT KiNgKoNg - 21.07.2015
Are you just sending a message to the people you'd like to show it too, or are you showing it in a Dialog?
Re: Displaying msg in rows -
Mariciuc223 - 21.07.2015
EDIT: Sorry , don't read all ... That's over my knowledge , sorry for post ..
Re: Displaying msg in rows -
Lajko1 - 21.07.2015
Well lets say that for test script I'm trying just to send message to players..
Re: Displaying msg in rows -
Evocator - 21.07.2015
sscanf!
Code:
new
info[3][10];
sscanf("Test1, test2, test3", "p<,>s[10]s[10]s[10]", info[0], info[1], info[2]);
for (new i = 0; i != 3; i++) {
printf("%i))) %s", i, info[i]);
}
And you will get:
Re: Displaying msg in rows -
GTLS - 21.07.2015
or use "\n" in your message(probably in formatted one) so it will create a new line in your msg.
Re: Displaying msg in rows -
Lajko1 - 21.07.2015
Quote:
Originally Posted by Ralfie
sscanf!
Code:
new
info[3][10];
sscanf("Test1, test2, test3", "p<,>s[10]s[10]s[10]", info[0], info[1], info[2]);
for (new i = 0; i != 3; i++) {
printf("%i))) %s", i, info[i]);
}
And you will get:
|
How can I do this when I'm using PlayerInfo[playerid][TicketInfo]; ?
Re: Displaying msg in rows -
Stereotype - 21.07.2015
In that case you are using multiple tickets, you need to have definition for all of them
for example
PlayerInfo[playerid][TicketInfo1]
PlayerInfo[playerid][TicketInfo2]
PlayerInfo[playerid][TicketInfo3]
And then when you want to send it use
SendClientMessage(playerid, -1, "Ticket 1 - %s",PlayerInfo[playerid][TicketInfo1] );