I’m currently looking for any help in creating a script that will broadcast through chat how many rounds are left on a particular map until a map change. This is for a Prop Hunt server, source found here.
I’ve got the global variable that stores how many rounds per map until a change (10), but struggling on how I can create a system that will display the amount of rounds left (10 - Current Round Number for example) until the server changes maps.
So I’ve written this, and now I’ve got a more specific question.
CURRENT_ROUND_NUMBER = 10 -- When Round Ends CURRENT_ROUND_NUMBER = CURRRENT_ROUND_NUMBER - 1 PrintMessage( HUD_PRINTTALK, CURRENT_ROUND_NUMBER .. " rounds left until map change.")
Basically this code is run whenever a round ends (As outlined in the source code of the mode). The question I now face is how to properly implement this; the Global Variable of CURRENT_ROUND_NUMBER is found within sh_config.lua, and I’m uncertain if I can actually change this variable all the way in init.lua. Does anyone have experience doing something like this? Would I be able to use a local variable within Init.lua, or is there a method I can link up these files to allow changes?
Cheers for reading.