Započeo Vilko
•11. Jan. 2011.[POMOC]Online players
622
pregleda
3
postova
Made Man
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
489
Postovi:
106
Teme:
Pridružio se:Sep. 2009
11. Jan. 2011.
E ovako, imam problem. Napravio sam textdraw za online igrace, ali kada neko ode nece mi vratit s recimo 2 na 1 vec ostane na 2 evo koda:
new Text:players;
ongamemodeint
// TextDraw for Players Online
players = TextDrawCreate(54.000000, 326.000000, "_");
TextDrawBackgroundColor(players, 255);
TextDrawFont(players, 2);
TextDrawLetterSize(players, 0.500000, 1.000000);
TextDrawColor(players, -65281);
TextDrawSetOutline(players, 1);
TextDrawSetProportional(players, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, players);
}
}
OnPlayerConnect
format(strings, 15, "%d/25",GetOnLinePlayers());
TextDrawSetString(players, strings);
TextDrawShowForPlayer(playerid, players);
OnGameModeExit
TextDrawHideForAll(players);
TextDrawDestroy(players);
stock GetOnLinePlayers()
{
new OnLine;
for(new i, g = GetMaxPlayers(); i < g; i++)
if(IsPlayerConnected(i))
OnLine++;
return OnLine;
}
new Text:players;
ongamemodeint
// TextDraw for Players Online
players = TextDrawCreate(54.000000, 326.000000, "_");
TextDrawBackgroundColor(players, 255);
TextDrawFont(players, 2);
TextDrawLetterSize(players, 0.500000, 1.000000);
TextDrawColor(players, -65281);
TextDrawSetOutline(players, 1);
TextDrawSetProportional(players, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, players);
}
}
OnPlayerConnect
format(strings, 15, "%d/25",GetOnLinePlayers());
TextDrawSetString(players, strings);
TextDrawShowForPlayer(playerid, players);
OnGameModeExit
TextDrawHideForAll(players);
TextDrawDestroy(players);
stock GetOnLinePlayers()
{
new OnLine;
for(new i, g = GetMaxPlayers(); i < g; i++)
if(IsPlayerConnected(i))
OnLine++;
return OnLine;
}
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava