SA-MP Forums Archive
Array and a 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: Array and a Dialog (/showthread.php?tid=337451)



Array and a Dialog - Luis- - 26.04.2012

Is it possible to make an array for example;
pawn Код:
new LowClassCars[][] = {
"Moonbeam"
}
if it is, how would I put it into a dialog?


Re: Array and a Dialog - SuperViper - 26.04.2012

pawn Код:
new string[512];

for(new i = 0; i < sizeof(LowClassCars); i++)
{
    format(string, sizeof(string), "%s%s\n", string, LowClassCars[i]);
}

ShowPlayerDialog(playerid, dialogid, dialogtype, header, string, button1, button2);
Adjust the string variable's size acoordingly.


Re: Array and a Dialog - Rudy_ - 26.04.2012

this is what you mean?
https://sampforum.blast.hk/showthread.php?tid=241745