local main_switch = ui.new_checkbox("LUA", "B", "Anti server crasher")
local full_update_key = ui.new_hotkey("LUA", "B", "Full update", true)
local function antikick()
if ui.get(main_switch) then
cvar.cl_timeout:set_raw_float(-1) -- Prevents you getting kicked from the game while server is down
end
if ui.get(full_update_key) then
cvar.cl_fullupdate:invoke_callback(1) -- Forces a full update on key press so u can move while the server is down
end
end
client.set_event_callback("paint_ui", antikick) -- Using paint_ui since the lua needs to be activated before joining a game