Question and help
#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


Messages In This Thread
Question and help - by MahdiGames - 07.01.2014, 21:51
Re: Question and help - by MahdiGames - 07.01.2014, 22:06
Respuesta: Question and help - by Swedky - 07.01.2014, 22:15
Respuesta: Question and help - by OTACON - 07.01.2014, 22:50
Re: Question and help - by MahdiGames - 08.01.2014, 11:58

Forum Jump:


Users browsing this thread: 1 Guest(s)