variables in dialog
#1

Hello.I wanna make this:
PHP код:
        new v1=PlayerInfo[playerid][pVeh];
        new 
v2=PlayerInfo[playerid][pVVeh];
        new 
v3=PlayerInfo[playerid][pVVVeh];
        
ShowPlayerDialog(playerid58DIALOG_STYLE_LIST"Your vehicles""v1\nv2\nv3""Select""Cancel"); 
But it shows dialog
v1
v2
v3
I want to make it with car names....
Reply
#2

You have to format string if you want to show variables values.
Reply
#3

You've to format it first.
Код:
new string[100],numb = random(5);
format(string,sizeof(string),"Meehhh %d.",numb);
ShowPlayerDialog(playerid, 58, DIALOG_STYLE_LIST, "Your vehicles",string, "Select", "Cancel");
Reply
#4

pawn Код:
new str[128];
format(str, sizeof (str), "%s \n %s \n %s", n1, n2, n3);
ShowPlayerDialog(playerid, 58, DIALOG_STYLE_LIST, "Your vehicles",str, "Select", "Cancel");
want to know about format?? then look at my signature.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)