Posts: 121
Threads: 34
Joined: Mar 2012
Reputation:
0
how can i know whether there are no players in the server
i want to restart the server when players are not there only once..how to do it??
Posts: 404
Threads: 26
Joined: Jan 2010
Reputation:
0
What do you mean?
You can open up SA:MP, add your server IP to favorites and check it ...
Posts: 559
Threads: 10
Joined: Mar 2012
Reputation:
0
If i understant what are you saying..you can look on sa-mp client and see if is any player on the server or if you hosted your server you can see there in control panel.
Posts: 121
Threads: 34
Joined: Mar 2012
Reputation:
0
no i mean i should see the no. of players by typing a command ingame
Posts: 559
Threads: 10
Joined: Mar 2012
Reputation:
0
You can see how many players is with TAB
Posts: 121
Threads: 34
Joined: Mar 2012
Reputation:
0
not for just seeing.. i want to auto restart the server when no players are there
Posts: 209
Threads: 2
Joined: Oct 2011
Reputation:
0
//OnGameModeInit
SetTimer("CheckForPlayers",5*60*1000,1);//5 minutes
//
forward CheckForPlayers();
public CheckForPlayers()
{
for(new i;i<MAX_PLAYERS;i++)if(IsPlayerConnected(i)&&!IsPl ayerNPC(i))return 1;
SendRconCommand("gmx");
return 1;
}
Posts: 121
Threads: 34
Joined: Mar 2012
Reputation:
0
thnxx +rep for all the three
Posts: 121
Threads: 34
Joined: Mar 2012
Reputation:
0
i'm using luxadmin and my script has a problem. if any player registers it wont save the player file but creates one empty file
and i tried adding manything for saving but coudn't. restarting is the only way to save it.
anyway thnxxfor help