If activeClients
Hello all , a little question just before the world ends . .
( The .cfg rotation is attached )
Yesterday i had it with 'if' only , no 'else if' and 'else' and only the >=1 maps worked and when i had 5 players in to test still only the >=1 maps rotated , so now i added the else if and else.
Do you think it will work ? do you see something wrong ? .
I don't see the "else if".
How you write it now, if the activeClients() returns 5 this is how the rotation will be considerd:
somemap1 somemap2 somemap3 { $timelimit = 5; $fraglimit = 20; $g_gametype = GT_FFA; $xp_config = "test"; } somemap4 somemap5 somemap6 { $timelimit = 8; $fraglimit = 30; $g_gametype = GT_FFA; $xp_config = "test"; }
why? very simple: because 5 >= 1 and 5> 4
To be good, it should have
if ( activeClients() >= 1 ) { .... } else if ( activeClients() > 4 ) { .... } else if ( activeClients() > 8 ) { .... }
Ahh... and you should to use: xp_activeClients
xp_activeClients:
Informative cvar that holds the number of non-spectators players that
are currently in the server. Very useful for writing conditional
rotations, see the Rotation System documentation for further information.
if ( xp_activeClients >= 12 ) { // big maps, 12 clients or more q3dm12 q3dm14 q3dm15 } else if ( xp_activeClients >= 6 ) { // normal maps, from 6 to 11 clients q3dm6 q3dm7 q3dm8 } else { // small maps, 5 clients or less q3dm2 q3dm3 q3dm5 }
See in the documentation : http://www.excessiveplus.net/documentation/server/rotation-system
_________
eps!slow
i dont see the return ...
Executed functions returns values, that's what i've meant.
___________
epsislow
this is good then ? ;
Yeah looks good.
Executed functions returns values, that's what i've meant.
___________
epsislow
i know what u've said , but it must be an return () ... to return values otherwise it's not an avaiable function .
$xp_config = "qlinsta"; ...... ====> "qlinsta.cfg"
Hmm, I think now that you were right with activeClients(),
because i've found out that the new version's is actually activeClients()
:
Note thatxp_activeClients
now is a function and should becomeactiveClients()
.
So try to replace xp_activeClients
with activeClients()
(sorry)
GL & HF
__________
epsislow
that the new version's is actually
activeClients()
Good 1 Epsi!
this is good then ? ;