• Forcing a console command for whole session on join
    3 replies, posted
Basically looking for a script that would make a console command (in this instance, I am in HL2RP/Clockwork and forcing the cwthirdperson to be 0, making it so the player is always in firstperson) execute on a player for the whole session once they join. This is what I have found: [CODE]hook.Add( "InitPostEntity", "join_con_commands", function() RunConsoleCommand( "cwThirdPerson", "0" ) end )[/CODE] That's for client-side. Here is my server-side version. [CODE]function GM:PlayerInitialSpawn( ply ) for k, v in pairs( player.GetAll() ) do v:RunConsoleCommand( "cwthirdperson", "0" ) end end[/CODE] Those basically execute the command once the player joins, but I am unsure if it will stick throughout the session because players can execute in the developer console "cwthirdperson 1" to go to third person. I am asking if anyone can help me with a script that would execute the command and disallow the player to do cwthirdperson 1 for the whole session.
Create a hook on Think that forces it to 0 every tick (or just remove the entire command)
Edit the gamemode? :v: Remove the ability to third person? :v: Remove the calcview hook? :v: Add a convar callback? :v:
or, since it's clockwork, remove the thirdperson plugin from your server?
Sorry, you need to Log In to post a reply to this thread.