new players = -1; // COLOCA ISTO NO TOPO
// NO TOPO DO ONPLAYERCONNECT
players++;
// NO FINAL DO GM
forward AtualizeTextDraws();
public AtualizeTextDraws()
{
new carol[128];
format(carol, sizeof(carol),"Players: %d/%d", players, GetMaxPlayers();
SendClientMessage(playerid, -1, carol);
return 1;
}
new players = -1; // COLOCA ISTO NO TOPO
// NO TOPO DO ONPLAYERCONNECT
players++;
// NO FINAL DO GM
forward AtualizeTextDraws();
public AtualizeTextDraws()
{
new carol[128];
format(carol, sizeof(carol),"Players: %d/%d", players, GetMaxPlayers();
TextDrawSetcarol(textdrawqualquerlugar, carol);
TextDrawShowForAll(textdrawqualquerlugar);
return 1;
}
//topo do Gm
new CountPlayers = -1;
new stringpls[37];
//OnPlayerConnect ou login
CountPlayers++;
format(stringpls, 37,"O servidor tem %d jogadores Online!", CountPlayers);
TextDrawSetString(COLOQUE O TEXT DRAW AQUI, stringpls);
//OnPlayerDisconnect
CountPlayers--;
format(stringpls, 37,"O servidor tem %d jogadores Online!", CountPlayers);
TextDrawSetString(COLOQUE O TEXT DRAW AQUI, stringpls);
pawn Код:
assim mandarб mensagem. para colocar textdraw: pawn Код:
|
Textdraw0 = TextDrawCreate(507.000000, 436.000000, "(%d/%d) ~w~Jogadores~n");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
Serб que pode colocar pra mim ? D;
pawn Код:
|
new players = -1; // COLOCA ISTO NO TOPO
// NO TOPO DO ONPLAYERCONNECT
players++;
// NO FINAL DO GM
forward AtualizeTextDraws();
public AtualizeTextDraws()
{
new carol[128];
format(carol, sizeof(carol),"(%d/%d) ~w~Jogadores~n", players, GetMaxPlayers();
TextDrawSetcarol(Textdraw0, carol);
TextDrawShowForAll(Textdraw0);
return 1;
}
pawn Код:
|
Cria o Seu Prуprio, aqui vai uma forзinha hh.
pawn Код:
|
new players = 0, PP = GetMaxPlayers();
for(new i; i <= PP; i++)
{
if(!IsPlayerConnected(i)) continue;
players++;
}
new string[30];
format(string, 27, "Tem %d/%d players online", players, PP);
SendClientMessage(playerid, 0x1E90FF99, string);
No Topo Do Seu Gamemode:
new Text:OnlinE;
Na public OnGameModeInit:
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);
}
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); } |