• Simple problem to do with ConVars
    0 replies, posted
How do I get a tool's client number without using Self? [CODE] local testvar = tobool( self:GetClientNumber( "test_variable" ) ) [/CODE] I had an idea- [CODE] local testvar = tobool( GetConVarNumber( "test_variable" ) ) [/CODE] but I'm pretty sure that only gets the serverside var. Someone said that if I wanted it clientside, I needed to use GetConVar without 'Number' at the end, but wouldn't that still be the same? It returned a table instead of a number for me, so do I need to do something like [CODE] local testvar = tobool( GetConVar( "test_variable" ):GetClientNumber( "test_variable" ) ) [/CODE] Seems a bit dodgy to me. P.S.- I did post this in the 'Problems that don't need their own thread' page, but nobody replied, probably because it's too simple or I'm missing something. [editline]13th March 2015[/editline] By the way, it's for a ConCommand that relies on tool variables. [editline]13th March 2015[/editline] Wait, nevermind. GetConVarNumber was right.
Sorry, you need to Log In to post a reply to this thread.