Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
determine whether there are human players

I'm trying to minimize the log file size (and possibly server load) by doing the following:

minplayers 2

so when there are no human players, bots will quit, too, and thus logs don't grow. Then when somebody does come to the server, there will be one bot to play against.

This works.

However, the server still keeps rotating maps, creating meaningless logs, so I do the following:

g_warmup 1
g_warmup_limit -1

so there will be unlimit warmup time. If there are no human players to end the warmup, the map won't rotate.

This works for pickup servers, in which most players are experienced. However, for a regular server, many beginners don't know about ALL READY, so they are stuck in warmup, which timer goes up instead of counting down, and the game never ends.

Is there a way to determine whether there are any human players on a server? Perhaps some hooks for me to adjust g_timelimit or g_warmup, or to call a vote, etc.? Or if there's a variable to get the number of human players, then I can write an ongoing timer to periodically check that variable.

Or are there other ways to remind players that they are in the warm up mode and they need to press F4 to start the real game?

There is currently no function to not change maps while empty. It would be a nice feature, but I think it would have to be done right (i.e. not an infinite timer, but rather ending the match & staying on the map vote until someone joins).
[Image: 230.png]

@Mario, are there hooks for a human player connecting and disconnecting?

Possibly Related Threads…
Thread Author Replies Views Last Post
  A certain server seems to manipulate stats of it's players by not listing some games nj 7 2,716 08-14-2022, 02:48 AM
Last Post: FAF
  how to have blue team only with bots and red team 1 human player and 2 bots billyjoe 7 6,952 09-04-2021, 11:53 AM
Last Post: AndK
  Some players have black textures ted 6 2,805 05-28-2020, 03:48 AM
Last Post: ted
  For domination, is there a way to get the number of teams the current map supports? Notavi 0 1,507 08-11-2018, 04:00 AM
Last Post: Notavi
  Is there an anti-camp code? zwz 16 11,278 09-28-2014, 03:09 PM
Last Post: Mr. Bougo
  Reasonable # of players per server end user 2 4,170 08-06-2013, 12:30 PM
Last Post: end user
  Is there a list of server settings? Lorizean 1 3,191 06-20-2013, 12:30 PM
Last Post: Mr. Bougo
  Good EU based dc for NA players end user 0 2,313 05-04-2013, 05:26 PM
Last Post: end user
  Private Players Configuration checholin87 2 3,007 05-12-2012, 01:26 AM
Last Post: Mr. Bougo

Forum Jump:

Users browsing this thread:
2 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-