forked from TeamUlysses/ulx
Setting an ULX cvar now no longer needless routes the cvar change through the console.
This commit is contained in:
parent
0ff7bb365b
commit
e470f8f76e
@ -1,6 +1,7 @@
|
||||
# ULX Changelog
|
||||
|
||||
## v3.73 - *(00/00/00)*
|
||||
* [CHANGE] Setting an ULX cvar now no longer needless routes the cvar change through the console.
|
||||
|
||||
## v3.72 - *(03/19/17)*
|
||||
* [CHANGE] UTeam is now disabled for DarkRP gamemodes to prevent conflicts (Thanks, Bo98).
|
||||
|
@ -26,9 +26,9 @@ function ulx.convar( command, value, help, access )
|
||||
-- table.insert( ulx.convarhelp[ currentCategory ], { cmd=command, access=access, help=help } ) -- TODO
|
||||
|
||||
local nospaceCommand = command:gsub( " ", "_" )
|
||||
ulx.cvars[ command:lower() ] = { help=help, cvar=nospaceCommand, original=command }
|
||||
local cvarName = "ulx_" .. nospaceCommand
|
||||
local obj = ULib.replicatedWritableCvar( cvarName, cvarName, value, false, false, "ulx " .. command )
|
||||
ulx.cvars[ command:lower() ] = { help=help, cvar=nospaceCommand, original=command, obj=obj }
|
||||
|
||||
return obj
|
||||
end
|
||||
|
@ -99,7 +99,7 @@ local function cc_ulx( ply, command, argv )
|
||||
-- But it's only the '%', or we'd use ULib.makePatternSafe instead of this.
|
||||
ply:ConCommand( "ulx_" .. cvar.cvar .. " \"" .. args:gsub( "(%%)", "%%%1" ) .. "\"" )
|
||||
else
|
||||
RunConsoleCommand( "ulx_" .. cvar.cvar, argv[ 2 ] )
|
||||
cvar.obj:SetString( argv[ 2 ] )
|
||||
end
|
||||
return
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user