local files = {"News.xml;News"} -- here are the tabs for panel and their names + files name
local resX,resY = guiGetScreenSize()
function startup()
window = guiCreateWindow(resX/5*2,resY/20*2.5,resX/5*6,resY/3*5,"Server Info panel",false)
guiSetVisible(window,false)
guiWindowSetMovable(window,false)
guiWindowSetSizable(window,false)
tPanel = guiCreateTabPanel(0,0.05,1,1,true,window)
for k, v in ipairs(files) do
local data = split(v,string.byte(";"))
local node = xmlLoadFile(data[1])
local text = xmlNodeGetValue(node)
local tab = guiCreateTab(data[2],tPanel)
local memo = guiCreateMemo(0.02,0.04,0.94,0.94,text,true,tab)
guiMemoSetReadOnly(memo,true)
xmlUnloadFile(node)
end
end
addEventHandler("onClientResourceStart",getResourceRootElement(),startup)
function toggle()
if (guiGetVisible(window)) then
showCursor(false)
guiSetVisible(window,false)
else
showCursor(true)
guiSetVisible(window,true)
end
end
bindKey("F1","down",toggle)
how to make this not bind but on markerhit?