11.05.2015, 19:21
The problem is that you pass "szDialog" as argument and it basically sets the first text twice.
Or you can even use ternary operator:
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 );
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" );