Can't check console command condition


I want my lua code check a console command condition but it doesn’t work

Here is my lua code part:

[lua]if GetConVarNumber(“sv_cheats”) != 1 then return end [/lua]

If someone can help me about this or even suggest another code that would help me


I had this problem aswell. Try just the normal GetConVar.

if GetConVar("sv_cheats") != 1 then return end

that… doesn’t even make sense…

if (GetConVar("sv_cheats"):GetInt() ~= 1) then return; end