Jump to content

health and Armor In DX


#RooTs

Recommended Posts

@Hex547, como add health 200% ??

Example:

  
local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 
else 
local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health2/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 
  

Look file name ( health and health2 ).

note (else in script) as an example

Link to comment

I and lekroots not managed solve, someone help? I'll send examples

Bugs in Health 100%~~200%

bugs in count Health 5 and 5 for 1 and 1

bugs in count Armor 5 and 5 for 1 and 1

the script is:

--Bugs in Health 100%~~200% 
--bugs in count Health 5 and 5 for 1 and 1 
local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 
  
-- account 5 and 5  for 1 and 1  
local armor = math.ceil(getPedArmor(localPlayer)) 
    if health > 0 and armor > 0 then 
        dxDrawImage(x*Alargura, y*Aaltura, largura, altura, "armor/"..(math.ceil(getPedArmor(localPlayer)/5)*5)..".png" ) 
end 

Look the script

viewtopic.php?f=108&t=81134

Link to comment

calm down buddy, every developer is even ignorant, they do not have the patience for beginners

original command

..(math.ceil(getElementHealth(localPlayer)/5)*5).. 

try this I think is this, a simple math to account 1 of 1 in Health

local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/1)*1)..".png" ) 
end 

now adds to Health 200% I do not already know, sorry

Link to comment
calm down buddy, every developer is even ignorant, they do not have the patience for beginners

As far i remember he is a scripter more than two years, and check his resources on community. Begginers doing stuff like creating a gate,bases etc etc not creating huds/shaders.

Begginer nah?

Noob? yes

Link to comment

@#Samy,

account 1 and 1 not work :(

..(math.ceil(getElementHealth(localPlayer)/1)*1).. 

the script is

local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 

does anyone know the formula for this? I'll leave it as is :(

Link to comment
@#Samy,

account 1 and 1 not work :(

..(math.ceil(getElementHealth(localPlayer)/1)*1).. 

the script is

local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 0 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 

does anyone know the formula for this? I'll leave it as is

not sure but maybe this?

  
    local health = math.ceil(getElementHealth(localPlayer)) 
    if health > 100 then return 
    elseif health < 100 then 
        dxDrawImage(x*Tlargura, y*Taltura, largura, altura, "health/"..(math.ceil(getElementHealth(localPlayer)/5)*5)..".png" ) 
end 
  

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