04.04.2016, 19:32
(
Последний раз редактировалось Zorono; 04.07.2016 в 11:12.
)
<removed>
new Text:pcounter;
#define MAX_P 100
public OnGameModeInit()
{
new string[32];
format(string,sizeof(string),"%i/%i",OnlinePlayers(),MAX_P);
pcounter = TextDrawCreate(309.000000, 9.000000, string);
TextDrawAlignment(pcounter, 2);
TextDrawBackgroundColor(pcounter, 255);
TextDrawFont(pcounter, 1);
TextDrawLetterSize(pcounter, 0.500000, 1.500000);
TextDrawColor(pcounter, -1);
TextDrawSetOutline(pcounter, 1);
TextDrawSetProportional(pcounter, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, pcounter);
return 1;
}
OnlinePlayers()
{
counter = 0;
for (new i = 0; i != MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
++counter;
}
return counter;
}