I'm looking in a way to input console commands into the server via code, like was a admin online all the time able to configure the server with the usual console commands.
engine we have the function Cbuf_ExecuteText
with that we can send any command to the server via code like we were in the console.
then the server will quit... should have some similar function in COD4 engine too, but don't know which the function is.
with that function will solve several of my problems, like some commands can't be replicated with perfection via code.
any other ideas/inputs will be great.
and about the clientcmd menu file will not work, since I need that to perform without any player online. maybe a servercmd variation? I tryed to make one but didn't work... :/
what I really need is to have a DVAR in the latched
state to perform what I need to work...
for exemple, if we change the DVAR g_gametype
in console and will dump the dvars we have like this for exemple:
g_gametype "dom" -- latched "sd"
then in fact the DVAR is not "sd" yet...
but if we do "the same" via code like this:
setDvar( "g_gametype", "sd" );
the DVAR is set right away with the new value, aside will only take effect after map restart, if you dump the var it's already "sd" and is not latched
like via console.
so or I find out a way to input console commands into the server, or I find out a way to reproduce the latched
DVARS via code...maybe theres another dvar function that do that set in latched state?
I know it's kinda of complicated, but I'm already crossed all the limits of the COD4 engine and I'm walking for some years in a very unknown places to improved even more my Frontlines mod. :D
any ideas? :P
thank you very much! :)