makkocska Posted November 4, 2014 Share Posted November 4, 2014 Hi guys ! I wrote one program in lua, and i'm very interested in what event or something else if its exists who check its already drawed in HUD. I mean . : local screenX,screenY = guiGetScreenSize() function pic() guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") end what event or something else check is already drawed, and if its already drawed not draw again. Link to comment
boro Posted November 4, 2014 Share Posted November 4, 2014 local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true else outputChatBox ("pic drawed") end end Link to comment
makkocska Posted November 4, 2014 Author Share Posted November 4, 2014 else -> do nothing . is that possible ? Link to comment
boro Posted November 4, 2014 Share Posted November 4, 2014 You mean without else ? local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true end end Link to comment
makkocska Posted November 4, 2014 Author Share Posted November 4, 2014 I mean if its already drawed on players screen than dont draw again. Link to comment
boro Posted November 4, 2014 Share Posted November 4, 2014 yes this help you local screenX,screenY = guiGetScreenSize() function pic() if not picdraw then guiCreateStaticImage( screenX - 377, 38, 232/2, 232/2, "pic/pic.ong") picdraw = true end end Link to comment
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