11.07.2014, 14:10
Well i have made a system,and i was making a last command for it,when i write that command it shows me all of the objects that have id 980,i knew how to detect it and it worked but i want to make a dialog to show me the id of all of the objects that have id 980,i looped them all as:
but it doesnt show me the dialog,because the format is wrong,What should i put to make this format work?what to edit in this:
because it's the problem
pawn Код:
for(new i = 0; i < MAX_OBJECTS; a++) //looping the objects
{
if(Object[a][ObjectModel] == 980) // for detecting...and this one works
{
new string[1536];
format(string, sizeof(string), "%s\n%d",finalstring, a);
ShowPlayerDialog(playerid,DIALOG_OBJECTS,DIALOG_STYLE_LIST,"objects", string,"Choose","Cancel");
}
}
pawn Код:
format(string, sizeof(string), "%s\n%d",finalstring, a);