Jump to content

image delete problems


Recommended Posts

Hi guys!

I'am a begginer lua scripter,so please "look away from my mistakes" ...

So there is a function -- > delete images, but i cant fix it because its only run once..when i start it.

How can i do that: check every seconds and if player health more than 80 - > do the destroy..

function imagedown() 
local HP = getElementHealth ( getLocalPlayer() ) 
    if(HP >= 80) then 
addEventHandler('onClientResourceStart', resourceRoot, imagedown) 

Thank you!

Link to comment

If you want to use dxDrawImage you need to put the function on event onClientRender. The image will be drawn for only 1 frame. With this render it will be kept drawing it on each frame. The only thing you have to do then is:

local HP = getElementHealth(getLocalPlayer()) 
    if (HP < 80) then 

Link to comment

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...