Posts: 284
Threads: 77
Joined: Nov 2013
I'v a problem with textdraw in my server iv to reload fs to fix it by rcon , here is pics

or
http://postimg.org/image/70v9m3e7x/
or

or
http://i43.tinypic.com/2u5t088.png
Also i want to ask how much timers i must put in server as max , to avoid lags?
Thanks for reading!
Posts: 284
Threads: 77
Joined: Nov 2013
Posts: 2,041
Threads: 97
Joined: Jun 2013
A Timer is not necessary, looks at this example:
pawn Код:
new UsersConnected; // We create a variable that counts the players.
public OnPlayerConnect(playerid)
{
UsersConnected ++; // We add the value whenever a player connects
new string[25];
format(string, sizeof(string), "Players online: %i.", UsersConnected);
TextDrawSetString(Text:text, string); // It changes 'Text:text'.
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
UsersConnected --; // We diminish the value whenever a player connects
new string[25];
format(string, sizeof(string), "Players online: %i.", UsersConnected);
TextDrawSetString(Text:text, string); // It changes 'Text:text'.
return 1;
}
Posts: 4,930
Threads: 467
Joined: Dec 2010
pawn Код:
new data[30];
format(data, sizeof(data), "players online: %d.", CountingOnlinePlayers());
TextDrawSetString(Text:text, data);
pawn Код:
stock CountingOnlinePlayers(){
new count=0;
for(new player, user = GetMaxPlayers(); player != user; player++){
if(IsPlayerConnected(player)){count++;}
}return count;
}
Posts: 284
Threads: 77
Joined: Nov 2013
Thanks what about textdraw ? this problem ?