diff --git a/locale/ExpGaming-Core/Core Help File.md b/locale/ExpGaming-Core/Core Help File.md index 3e3c24bc..c92b1fe0 100644 --- a/locale/ExpGaming-Core/Core Help File.md +++ b/locale/ExpGaming-Core/Core Help File.md @@ -109,6 +109,8 @@ See code for more details. * name = value retured by sudo * value (opt) = new value if making a new temp varible * offset (opt) = if the base time is too short, for very big commands +* format_as_temp_var(string) + * returns the same value that sudo would with out running the function * command: /server-interface * Run loadstring on lua code given like /c but does not break achievements * restriction = 'Admin' \ No newline at end of file diff --git a/locale/ExpGaming-Core/ExpGaming - Server Interface.lua b/locale/ExpGaming-Core/ExpGaming - Server Interface.lua index e033297f..386abe31 100644 --- a/locale/ExpGaming-Core/ExpGaming - Server Interface.lua +++ b/locale/ExpGaming-Core/ExpGaming - Server Interface.lua @@ -42,6 +42,10 @@ function sudo(command,args,custom_return_name) return {sudo='sudo-temp-var',name=return_name} end end +--turns a string into the temp var format so that it can be used +function format_as_temp_var(string) + return {sudo='sudo-temp-var',name=tostring(string)} +end --update the time on a temp var or add it as a new one function refresh_temp_var(name,value,offset) local offset = offset or temp_var_time