Jump to content

already drawImg


makkocska

Recommended Posts

Posted

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.

Posted
  
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 

Posted

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 

Posted

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 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...