I'm really confused. Whenver I make a new ClientConVar, it is automatically blocked.
3 replies, posted
I'm making a convar, and then trying to run it serverside with ply:ConCommand( "timer_disable 1" ) and ply:ConCommand( "timer_disable 0" ).
Whenever I run that, it prints this in console:
ConCommand blocked! (timer_disable 1)
If the client just types it into their console it works fine. I have no idea why this isn't working. I'm creating the ConVar like this:
[CODE]
CreateClientConVar( "timer_disable", 0, true, true )
[/CODE]
I've tried restarting the client, I've tried changing the name of the convar, and I've tried really everything I can think of. I googled around and no one has had this issue with a custom ConVar, only the ones that are blocked automatically, like sv_cheats.
Anyone got advice?
edit: I am using them in the correct files. ply:ConCommand() is being run serverside, and CreateClientConVar is being run clientside. I know both files are being added correctly because there's lots more code in both files and all of it runs correctly. Also, this convar is not referenced anywhere in the already existing code, I'm just appending it to a file I have already, so there's no way anything is interfering.
help please :(
I just ran your code and it works fine.
I'm not sure what could be causing the conflict.
[img]http://i.imgur.com/YVfDQ3F.png[/img]
We are going to need more information about your setup/addons.
[QUOTE=mfsinc;42871705]It may be because of the name. Garry blocks certain strings from RunConsoleCommand/ConCommand. Try a different name.[/QUOTE]
I tried this name too and it worked
It may be because of the name. Garry blocks certain strings from RunConsoleCommand/ConCommand. Try a different name.
Sorry, you need to Log In to post a reply to this thread.