25.05.2014, 23:40
Galera estou mexendo na minha GM de truck, estou querendo colocar um texto perto do radar mostrando a quantidade de plays e a quantidade de score, alguem poderia me ajudar ?
new Text:PlayersOn;
PlayersOn = TextDrawCreate(12.000000, 384.000000, "");
TextDrawBackgroundColor(PlayersOn, 255);
TextDrawFont(PlayersOn, 2);
TextDrawLetterSize(PlayersOn, 0.170000, 1.399999);
TextDrawColor(PlayersOn, -1);
TextDrawSetOutline(PlayersOn, 1);
TextDrawSetProportional(PlayersOn, 1);
TextDrawSetSelectable(PlayersOn, 0);
SetTimer("Playerson", 1, true );
TextDrawShowForPlayer(playerid, PlayersOn);
forward ContarJogadores();
public ContarJogadores()
{
new Jogadores = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
Jogadores++;
}
}
return Jogadores;
}
forward Playerson(playerid);
public Playerson(playerid)
{
new Joao[200];
format(Joao, 200, "~w~~h~%i/%i", ContarJogadores() ,GetMaxPlayers());
TextDrawSetString(PlayersOn, Joao);
return true;
}
format(Joao, 200, "%i/%i", ContarJogadores() ,GetMaxPlayers());
format(Joao, 200, "%i", GetPlayerScore());