05.10.2015, 12:31
That ^, and here:
pawn Код:
CMD:game(playerid, params[])
{
OnBoard[playerid] = true;
new JoinedPlayerStr[35], str[950] = "Game Status: ";
switch(GameStatus)
{
case 0: strcat(str, "{33CC33}Ready for play! (/ready)");
case 1: strcat(str, "{FF0000}Starting...");
case 2: strcat(str, "{FFFFFF}In Progress...");
case 3: strcat(str, "{DDDD00}Finished! Resetting...");
case 4: strcat(str, "{FF0000}! LOCKED !");
}
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", "");
}