• Need help with ConVars
    5 replies, posted
I made a convar with the flag "FCVAR_ARCHIVE" and I changed the value. How can I reset the value? I know you can just go to the console and change it from there but is there any way for it to change through coding? Because I am working on an update for an addon I have uploaded on workshop and I had to change the value for a convar, but I don't want to require over 50,000 people to go to the console and change the convar. ~ Sorry for my bad English Thanks!
RunConsoleCommand("myconvar", "newvalue") [editline]12th April 2014[/editline] Scratch that, just rename the ConVar for your case.
Wait so there is no way to change it?![QUOTE=Robotboy655;44527212]RunConsoleCommand("myconvar", "newvalue") [editline]12th April 2014[/editline] Scratch that, just rename the ConVar for your case.[/QUOTE]
[QUOTE=vrej;44527309]Wait so there is no way to change it?![/QUOTE] Are you blind or something? If you want all users to have reset a ConVar, the best and easiest way is to just rename the ConVar. If you want to change a ConVars value from Lua, use the first function I posted.
No, I was trying to say something else but never mind, thanks for the help. [QUOTE=Robotboy655;44527431]Are you blind or something? If you want all users to have reset a ConVar, the best and easiest way is to just rename the ConVar. If you want to change a ConVars value from Lua, use the first function I posted.[/QUOTE]
Before calling CreateConVar, check if the convar already exist, and if yes, update to the new value with RunConsoleCommand. Or am I missing something ?
Sorry, you need to Log In to post a reply to this thread.