Question and help
#1

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!
Reply
#2

Help?
Reply
#3

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;
}
Reply
#4

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;
}
Reply
#5

Thanks what about textdraw ? this problem ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)