Jump to content
Sign in to follow this  
OB1

Server Player Count

Recommended Posts

Here is another one for you guys,

I need something that can detect the number of players in a server and if the number of players reach a specified level if executes a .sqf

any ideas ?

Share this post


Link to post
Share on other sites

if (count playableUnits > 0) then {hint format["%1 players on Server", count playableUnits]};

playableUnits works only in multiplayer mode. To test in singleplayer you can put following in your init.sqf:

if (!isMultiplayer) then {
playableUnits=switchableUnits;
};

Edited by Buliwyf

Share this post


Link to post
Share on other sites

Thanks but I'm not sure how to exec a .sqf from that when a specified number has been reached. Sorry I'm really not good with this stuff..

Share this post


Link to post
Share on other sites

if (count playAbleunits >= 5) then {
  // execVM your script here, and read the guide in my sig to get to know the basics.
  hint "number of players in mission is 5 or higher";
};

>= left is same or higher than right

<= lower

== equal to

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×