19.09.2011, 17:09
Hey guys,
I wanna know how to show all the names in a list (dialog in this case), like this:
I dont really got a clue, but i made a little snippet, which should work, but wont show the names in the dialog (i think).
~Wesley
I wanna know how to show all the names in a list (dialog in this case), like this:
Код:
Name 1 (wanted level) Name 2 (wanted level) Name 3 (wanted level) Name 39393938272717119 (wanted level)
pawn Код:
COMMAND:checkwanted(playerid, params[])
{
new dialog[256], name[24];
for( new i = 0; i < MAX_PLAYERS; i ++ )
{
if( GetPlayerWantedLevel( i ) >= 2 )
{
GetPlayerName( i, name, 24);
format( dialog, sizeof dialog, "%s (%i)", name, GetPlayerWantedLevel( i ) );
}
}
ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "Wanted levels", dialog, "Ok", "");
return 1;
}