-------------------------
--GUI
local screenW, screenH = guiGetScreenSize()
bg = guiCreateStaticImage((screenW - 1920) / 2, (screenH - 1080) / 2, 1920, 1080, "files/img/background.png", false)
-------------------------
--Zmienne
local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted" }
-------------------------
--Kod od GUI na pokazanie/chowanie
function showGUI()
guiSetVisible (bg, true)
showChat(false)
for _, component in ipairs( components ) do
setPlayerHudComponentVisible( component, false )
end
end
addEventHandler("onClientRender", root,showGUI)
function hideGUI()
guiSetVisible (bg, false)
end
addEventHandler("onClientFileDownloadComplete", root, hideGUI)
-------------------------