Jump to content

dxDrawText() and getElementExtraHealth(Nemesis)


Adde

Recommended Posts

Hello, I am trying to help my friend but it seems like I would need some help as well. I am working with a script that will show the nemesis health ( if he isn´t dead) on the screen.

He told me that I can call a function to get the health with "exports.extra_health:getElementExtraHealth(Nemesis)" but it does not work. "attempt to concatenate nHealth ( a boolean value)" in debug. Then how can I get the nemesis health?

It´s the scripts nemesis, slothbot and extra_health from community, I think.

Someone who want to help me or maybe knows how to do it?

Current code (only the nemesis health part):

nHealth = exports.extra_health:getElementExtraHealth(Nemesis) 
if ( nHealth ) and ( nHealth >= 1 ) then 
dxDrawText("Nemesis health: "..nHealth, 1550/1920*x, -1050/1080*y, x, y, tocolor(255, 0, 0), 1/1920*x, 1/1080*y, "pricedown", "left", "center", false, false, false) 
end 

Edited by Guest
Link to post

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