14.06.2012, 16:45
Quote:
OnlinE = TextDrawCreate(507.000000, 436.000000, "(%d/%d) ~w~Jogadores~n"); TextDrawBackgroundColor(OnlinE, 255); TextDrawFont(OnlinE, 3); TextDrawLetterSize(OnlinE, 0.500000, 1.000000); TextDrawColor(OnlinE, -1); TextDrawSetOutline(OnlinE, 0); TextDrawSetProportional(OnlinE, 1); TextDrawSetShadow(OnlinE, 1); for(new i; i < MAX_PLAYERS; i ++) { TextDrawShowForPlayer(i,OnlinE); } } e Criando 1 Nova Public: public PlayerOn(playerid) { new Playersnoservidor = 0; new string[128]; for(new i = 0; i < GetMaxPlayers(); i++) { if (IsPlayerConnected(i)) { Playersnoservidor++; } } format(string,sizeof(string),"%i ~w~Jogadores~n", Playersnoservidor); TextDrawSetString(OnlinE, string); } |
OnPlayerDisconnect;
Playersnoservidor--; Para que quando sairem do server ele diminuir uma pessoa online.