Dialog TabList only displays left column (And not even all of it)
#1

Been trying to use a tablist to set names by order. The left column is the only one that works properly.

pawn Код:
CMD:game(playerid, params[])
{ // Thanks Threshold
    OnBoard[playerid] = true;
    new JoinedPlayerStr[35], str[950] = "Game Status: ";
    switch(GameStatus)
    {
        case 0: strcat(str, "{33CC33}Ready for play! (/ready)\t|\t|\t|\n");
        case 1: strcat(str, "{FF0000}Starting...\t|\t|\t|\n");
        case 2: strcat(str, "{FFFFFF}In Progress...\t|\t|\t|\n");
        case 3: strcat(str, "{DDDD00}Finished! Resetting...\t|\t|\t|\n");
        case 4: strcat(str, "{FF0000}! LOCKED !\t|\t|\t|\n");
    }
    strcat(str, "\n---------------------------------------------------\n");
    for(new i = 0; i < 24; i++)
    {
        if(!IsPlayerConnected(JoinedPlayer[i])) continue;
        new colorstring[7] = "AAAAAA";
        if(JoinedPlayer[i] != -1)
        {
            new Float:Health;
            GetPlayerHealth(JoinedPlayer[i], Health);
            if(90.0 <= Health <= 100.0) colorstring = "33CC33";
            else if(70.0 <= Health < 90.0) colorstring = "99CC00";
            else if(50.0 <= Health < 70.0) colorstring = "DDDD00";
            else if(20.0 <= Health < 50.0) colorstring = "FF6600";
            else if(0.0 < Health < 20.0) colorstring = "FF0000";
        }
        format(JoinedPlayerStr, sizeof(JoinedPlayerStr), (!((i + 1) % 4) && i != 23) ? ("{%s}%s\n") : ("{%s}%s\t"), colorstring, GetName(JoinedPlayer[i]));
        strcat(str, JoinedPlayerStr);
    }
    return ShowPlayerDialog(playerid, GAME_DIALOG, DIALOG_STYLE_TABLIST, "The Hunger Games 2015", str, "Close", "");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)