Hi all, i have little problem with sending client data to server, so have this:
My admin menu file (he running as client, because derma supported by client only) and hafe one "Server file" wich run and do concommands...
So My admin menu have checkboxes wich must set server convars to 1 or 0 if i an admin.
But client can't set Server convars and i need help how to make function or something...
-------------------------------------
local CheckGodmode = vgui.Create("DCheckBoxLabel" , BackPanel_Sheets_Settings)
CheckGodmode:SetPos(5,5)
CheckGodmode:SetText("God mode")
CheckGodmode:SetConVar("sbox_godmode" ) -- this is server convar wich must be on or off when i check my box or else...
CheckGodmode:SizeToContents()
This is little part of my file for example...
And i have my own rcon function like this: aa_rcon "" -> wich run from client commands on server..
Remove CheckGodmode:SetConVar("sbox_godmode" ) and add:
[code]CheckGodmode.OnChange = function()
RunConsoleCommand( "sbox_godmode", CheckGodmode:GetChecked() )
end[/code]
Note it is untested so there may be errors.
Sorry, you need to Log In to post a reply to this thread.