SA-MP Forums Archive
variables in dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: variables in dialog (/showthread.php?tid=490811)



variables in dialog - barts - 28.01.2014

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....


Re: variables in dialog - Scottas - 28.01.2014

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


Re: variables in dialog - Beckett - 28.01.2014

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");



Re: variables in dialog - newbie scripter - 28.01.2014

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.