Quote:
Originally Posted by Konstantinos
The problem is that you pass "szDialog" as argument and it basically sets the first text twice.
pawn Код:
// if: format( szDialog, sizeof( szDialog ), "Name\tStatus\n\%s\t{04BD04}online{FFFFFF}\n", name );
// else: format( szDialog, sizeof( szDialog ), "Name\tStatus\n\%s\t{D10F0F}offline{FFFFFF}\n", name );
Or you can even use ternary operator:
pawn Код:
format( szDialog, sizeof( szDialog ), "Name\tStatus\n\%s\t%s{FFFFFF}\n", name, (userID != INVALID_PLAYER_ID) ? ("{04BD04}online") : ("{D10F0F}offline"));
ShowPlayerDialog(playerid, DIALOG_TENANTS, DIALOG_STYLE_TABLIST_HEADERS, "Your tenants:", szDialog, "Select", "Back" );
|
both versions shows only the first player, not otherwise