bot_minplayers rotation.txt help
Hello all
I am trying to figure out some way to change bot_minplayers as clients join my server. I have bot_minplayers 5 and on arival of two clients I want to kick all bots and on departure of clients the bots enter back into the game. I have tried many ways such as : if ( xp_activeclients > 1 ) { bot_minplayers 0 }
else { bot_minplayers 5 }
or something like this if ( xp_activeclients > 1 ) { k allbots }
Can someone tell me if it is possible to do this. Im thinking its not cause I have not seen this done on any server.
If not I would like to see such feature in the future.
Rotation works when map is finished and only then you can apply the conditions based on these variables. It won't kick bots during game, but should work on next map. Also you have syntax error there - missed colon after var name when u set it's value:
if ( xp_activeclients > 1 ) { bot_minplayers: 0 } else { bot_minplayers: 5 }
Did you try that in a CronTab batch ?
Say with intervals of 1 minute you can check if conditions are met, not as people enter or leave. (I think..)
else if ( xp_activeclients <= 1 ) { bot_minplayers: 7 }
should this line read
else ( xp_activeclients <= 1 ) { bot_minplayers: 7 } ?
remove the if because i think the code is asking for another argument.
I think the if ~ else scenario is only checked upon rotation, which is why it is failing, maybe someone else from the e+ team could confirm this?
but, hmmm.. let me dwell on it, i like a challenge, if i come up with a solution i will let you know.
Great job ditto !!
Would you be so kind to share the snippet of code that made it work?
And are you executing this from cron?
This sounds like it could work. Not like I wanted but a really good idea. I will try and see what happens.
Thanks!