Count online players
#3

pawn Code:
new count = 0,
    string[64],
    name[24];

public OnPlayerConnect(playerid)
{
    count++;
    GetPlayerName(playerid,name,24);
    format(string,sizeof(string),"%s has joined! He is player number %d",name,count);
    SendClientMessageToAll(-1,string);
    return 1;
}
public OnPlayerDisconnect(playerid)
{
    count--;
    return 1;
}
Reply


Messages In This Thread
Count online players - by milanosie - 28.01.2012, 10:02
Re: Count online players - by MasterJoker - 28.01.2012, 10:04
Re: Count online players - by [XST]O_x - 28.01.2012, 10:08
Re: Count online players - by milanosie - 28.01.2012, 10:10

Forum Jump:


Users browsing this thread: 1 Guest(s)