Olá, hoje vou mostrar a você como fazer um TextDraw simples com jogadores online. 
Então, vamos começar

primeiro, devemos colocar no topo do FilterScript / GameMode isto:
Código:
novo texto: jogadores;Código:
// TextDraw para jogadores online jogadores = TextDrawCreate (54,000000, 326,000000, "_"); TextDrawBackgroundColor (jogadores, 255); TextDrawFont (jogadores, 2); TextDrawLetterSize (jogadores, 0,500000, 1,000000); TextDrawColor (jogadores, -65281); TextDrawSetOutline (jogadores, 1); TextDrawSetProportional (jogadores, 1); para (novo i; i <MAX_PLAYERS; i ++) { if (IsPlayerConnected (i)) { TextDrawShowForPlayer (i, jogadores); } }
Mas agora devemos mostrá-lo para os jogadores, então em público OnPlayerConnect coloque isto:Código:
novas strings [15]; formato (strings, 15, "% d / 50", GetOnLinePlayers ()); TextDrawSetString (players, strings); TextDrawShowForPlayer (playerid, jogadores);
Código:
TextDrawHideForAll (jogadores); TextDrawDestroy (jogadores);
Código:
Stock GetOnLinePlayers () { novo OnLine; para (novo i, g = GetMaxPlayers (); i <g; i ++) if (IsPlayerConnected (i)) OnLine ++; return OnLine; }

Resultado:

0 Comentários