Hello! I started lua programming in MTA so, I got a problem, and I don't understand the other topics. Just send the code, and I will read it, and understand it. And if you can descript it pls do it.
How to optimize this code on every screen?
local x,y = guiGetScreenSize()
oX, oY =1920,1080function mainRender()local health, armor = getElementHealth(localPlayer), getPedArmor(localPlayer)local h, m = getTime()if h <10then h ="0".. h endif m <10then m ="0".. m end
dxDrawRectangle(1590/oX*x,30/oY*y,300/oX*x,100/oY*y 0x7F000000)
dxDrawRectangle(1600/oX*x,40/oY*y,280*healt/100/oX*x,10/oY*y, tocolor(255,0,0))-- élet
dxDrawRectangle(1600/oX*x,60/oY*y,280*armor/100/oX*x,10/lY*y, tocolor(0,0,255))-- pajzs
dxDrawText(h ..":".. m,1600,70, _, _, _,2,"pricedown","left","top")--időend
addEventHandler("OnClientRender", root, mainrender)
Question
dobos90
Hello! I started lua programming in MTA so, I got a problem, and I don't understand the other topics. Just send the code, and I will read it, and understand it. And if you can descript it pls do it.
How to optimize this code on every screen?
Link to comment
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now