Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local sx, sy = guiGetScreenSize()
  2. --sx, sy = 1280, 720
  3.  
  4. function render()
  5.     if not getElementData(localPlayer, "interface:isDisabled") then
  6.         local datas = {getElementHealth(localPlayer), getElementData(localPlayer, "user:hunger"), getElementData(localPlayer, "user:thirst"), getElementData(localPlayer, "user:fatigue"), tocolor(255, 50, 50), tocolor(109, 48, 13), tocolor(16, 87, 153), tocolor(226, 212, 6), "hud/files/health.png", "hud/files/hunger.png", "hud/files/thirst.png", "hud/files/fatigue.png"}
  7.         for i=0,3 do
  8.             dxDrawRectangle(sx-206, sy-114+(i*26), 200, 24, tocolor(20, 20, 20, 255))
  9.             dxDrawRectangle(sx-232, sy-114+(i*26), 24, 24, tocolor(20, 20, 20, 255))
  10.             dxDrawRectangle(sx-206+2, sy-114+(i*26)+2, datas[i+1]*1.96, 20, datas[i+5])
  11.             dxDrawImage(sx-228, sy-110+(i*26), 16, 16, datas[i+9])
  12.         end
  13.     end
  14. end
  15. addEventHandler("onClientRender", root, render)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement