Jump to content

progress Health Ped [HELP]


yce

Recommended Posts

How can I do a script show HP 
from a ped any? 
I already did a ped

exemple:

function PED1 (source)

local mypeds = createPed(7,-2430.74902, -590.24249, 131.80247)
outputChatBox("YOU CREATED A PED")

end
addCommandHandler("ped1",PED1)


 

 

Edited by jhxp
Link to comment
  • 1 month later...
  • 2 weeks later...
  • 3 months later...
  • Scripting Moderators
6 hours ago, yce said:

please help?I need

 

Check, should work. If not, let me know. A example code.

-- clientside

local screenWidth, screenHeight = guiGetScreenSize()
local ped1 = createPed(7, -2430.74902, -590.24249, 131.80247)

function onClientRender()
	local ped_health = getElementHealth(ped1)
	dxDrawText(ped_health, screenWidth * 0.800, screenHeight * 0.500, screenHeight * 0.060, screenHeight * 0.060, tocolor(255, 255, 255, 255), 0.75, "default-bold", "left", "top", false, false, false, false, false)
end
addEventHandler("onClientRender", getRootElement(), onClientRender)

 

Link to comment

 

no it worked

I Made a folder with Name "PED"
inside it I made a file called "meta.xml" and "client.lua"
inside  of file "meta.xml" I wrote

<meta>

<script src="client.lua" type="client" />

</meta>

 


 

Edited by yce
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...