Sign in to follow this  
yce

progress Health Ped [HELP]

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

Share this post


Link to post
Quote

I'm new to the script, could you help me?

Quote

 

 

I'm new to the script, could you help me?

Share this post


Link to post
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)

 

Share this post


Link to post
Posted (edited)

Salvar em server.lua ou client.lua?
desculpe, eu sou novo  em Scrpt

Edited by yce

Share this post


Link to post
1 hour ago, yce said:

Salvar em server.lua ou client.lua?
desculpe, eu sou novo  em Scrpt

Client.

Share this post


Link to post
Posted (edited)

 

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.