• creating client convars
    2 replies, posted
Is there anyway to make 10 client convars from a table? like this: [lua] local cvars = {} cvars[1] = "cvar1" cvars[2] = "cvar2" cvars[3] = "cvar3" cvars[4] = "cvar4" cvars[5] = "cvar5" cvars[6] = "cvar6" cvars[7] = "cvar7" cvars[8] = "cvar8" cvars[9] = "cvar9" cvars[10] = "cvar10" [/lua] then using just 1 or 2 lines to create all the client convars instead of of just doing CreateClientConVar 10 times, how should I do that?
[lua] local t = {"cvar1", "cvar2", "cvar3"}; for k,v in pairs(t) do CreateClientConVar(v, "", true, false); end [/lua] [editline]4th December 2010[/editline] not sure about the format of createclientconvar, haven't coded glua for ages
Ok, i'll try that out.
Sorry, you need to Log In to post a reply to this thread.