Help dialog
#3

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
Reply


Messages In This Thread
Help dialog - by Edw - 11.05.2015, 18:54
Re: Help dialog - by Konstantinos - 11.05.2015, 19:21
Re: Help dialog - by Edw - 11.05.2015, 19:43
Re: Help dialog - by Konstantinos - 11.05.2015, 19:50
Re: Help dialog - by Edw - 11.05.2015, 20:10
Re: Help dialog - by JoaoMonteiro452 - 14.06.2015, 13:14

Forum Jump:


Users browsing this thread: 1 Guest(s)