Server Reach Player(FS)
#1

Hi
What Is This FS Name?
Reply
#2

UP
Reply
#3

Код:
new playersJoined; 

forward CheckReachPlayers();
{
     new string[128];
     format(string, sizeof(string), "Now player reached at %d players", playersJoined);
     SendClientMessage(playerid, -1, string);
     //Your other code give player money and bla bla bla as you want.
     return 1;
}

public OnGameModeInit() { 
    SetTimer("CheckReachPlayers",  5000, true); //Your time to check reach players
    playersJoined = 0; 
    return true; 
} 

public OnPlayerConnect(playerid) { 

    playersJoined += 1; 
    return true; 
} 

public OnPlayerDisconnect(playerid, reason) { 

    playersJoined -= 1; 
    return true; 
}
Reply
#4

Код:
new playersJoined; 

public OnPlayerConnect(playerid) { 

    if(++playersJoined >= 20)
    {
		new string[128];
		format(string, sizeof(string), "Now player reached at %d players", playersJoined);
		SendClientMessage(playerid, -1, string);
		//Your other code give player money and bla bla bla as you want.
    } 
    return true; 
} 

public OnPlayerDisconnect(playerid, reason) { 

    playersJoined --; 
    return true; 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)