setPlayerHudComponentVisible("ammo", false)
setPlayerHudComponentVisible("armour", false)
setPlayerHudComponentVisible("clock", false)
setPlayerHudComponentVisible("health", false)
setPlayerHudComponentVisible("money", false)
setPlayerHudComponentVisible("vehicle_name", false)
setPlayerHudComponentVisible("weapon", false)
local sx,sy = guiGetScreenSize()
local px,py = (sx/1366),(sy/768)
bindKey("f11", "down", function()
if map == true then
map = false
setElementData(localPlayer, "hud:enabled", true)
showChat(true)
setPlayerHudComponentVisible("all", false)
setPlayerHudComponentVisible("radar", true)
setPlayerHudComponentVisible("crosshair", false)
setElementData(localPlayer, "logged", true)
else
map = true
setElementData(localPlayer, "hud:enabled", false)
showChat(false)
setPlayerHudComponentVisible("all", false)
setElementData(localPlayer, "logged", false)
end
end)
--[[addEventHandler("onClientRender", root,
function()
local godzina, minuty = getRealTime().hour, getRealTime().minute
dxDrawImage(652*px, 0*py, 714*px, 112*py, "hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(getElementData(localPlayer, "player:reputation"), 701*px, 19*py, 823*px, 35*py, tocolor(255, 255, 255, 255), 1.35*px, "sans", "left", "top", false, false, false, false, false)
dxDrawText(getPlayerMoney(), 859*px, 19*py, 981*px, 35*py, tocolor(255, 255, 255, 255), 1.35*px, "sans", "left", "top", false, false, false, false, false)
dxDrawText(string.format("%.0f", getElementHealth(localPlayer)).."%", 1026*px, 19*py, 1148*px, 35*py, tocolor(255, 255, 255, 255), 1.35*px, "sans", "left", "top", false, false, false, false, false)
dxDrawText(string.format("%02d:%02d", godzina, minuty), 701*px, 64*py, 749*px, 84*py, tocolor(255, 255, 255, 255), 1.40*px, "sans", "left", "top", false, false, false, false, false)
end
)--]]
tik = getTickCount()
addEventHandler("onClientRender", root,
function()
local godzina, minuty = getRealTime().hour, getRealTime().minute
if not getElementData(localPlayer, "logged") then return end
if getKeyState("tab") then return end
dxDrawImage(764*px, 0*py, 714*px, 112*py, "hud.png")
dxDrawText(getElementData(localPlayer, "player:reputation"), 820*px, 22*py, 934, 36, tocolor(255, 255, 255, 255), 1.25*px, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText(getPlayerMoney(), 977*px, 22*py, 1091*px, 36*py, tocolor(255, 255, 255, 255), 1.25*px, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText(string.format("%.0f", getElementHealth(localPlayer)).."%", 1146*px, 22*py, 1260*px, 36*py, tocolor(255, 255, 255, 255), 1.25*px, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText(string.format("%02d:%02d", godzina, minuty), 820*px, 54*py, 868*px, 73*py, tocolor(255, 255, 255, 255), 1.40*px, "default-bold", "left", "top", false, false, false, false, false)
dxDrawImage(1256*px, 14*py, 74*px, 64*py, "hud/"..tostring(getPedWeapon(localPlayer)).. ".png")
end)