• run server console commands at startup not working for all commands
    4 replies, posted
Hello, I've got a few commands I run. One of them is for tfa weapons for sprint. It works when I type it into the console just fine. But when I add it to the following script it does not take effect. RunConsoleCommand( "sv_tfa_sprint_enabled", "1") does not work. I tried it in OnGamemodeLoaded and InitPostEntity but neither work. The other commands work fine. hook.Add( "OnGamemodeLoaded", "ShowVersion", function() --RunConsoleCommand( "sv_tfa_bullet_doordestruction", "0") -- I suggest that you do not enable this, allowing door destruction can break area portals. RunConsoleCommand( "sv_tfa_cmenu_key", "22") -- rebinds inspect menu to L, otherwise it will conflict with buy menu RunConsoleCommand( "bind", "playermodel_selector", "p") -- rebinds player model selector to the p button end) hook.Add( "InitPostEntity", "ShowVersion", function() RunConsoleCommand( "sv_tfa_sprint_enabled", "1") end) Thanks, Me
Uh, why are you using a script to do this exactly and not just putting it in your server's autorun or config files? There's not a lot of info to work off of here.
I want it to run when the server starts. the sv_tfa commands don't work in server.cfg
Okay, what about in autoexec?
oh, bind is not supposed to work otherwise it could be abused and players could have all their keys rebound without consent :p Blocked ConCommands oh wells. Maybe I just have a motd to tell people bind certain commands to a key :p
Sorry, you need to Log In to post a reply to this thread.