yce Posted November 2, 2018 Share Posted November 2, 2018 (edited) 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 December 19, 2018 by jhxp Link to comment
MrZsemle Posted November 6, 2018 Share Posted November 6, 2018 Hi! You want to write ped's health in dxDraw or in the chatbox? Link to comment
yce Posted December 17, 2018 Author Share Posted December 17, 2018 dxDraw help please Link to comment
MrZsemle Posted December 30, 2018 Share Posted December 30, 2018 Get the Ped's health with getElementHealth and draw to screen with dxDrawText. If you want set the ped's default displayed health to 100 divide the getElementHealth with 100. Link to comment
yce Posted April 21, 2019 Author Share Posted April 21, 2019 Quote I'm new to the script, could you help me? Quote I'm new to the script, could you help me? Link to comment
Scripting Moderators ds1-e Posted April 24, 2019 Scripting Moderators Share Posted April 24, 2019 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
yce Posted April 24, 2019 Author Share Posted April 24, 2019 (edited) Salvar em server.lua ou client.lua? desculpe, eu sou novo em Scrpt Edited April 24, 2019 by yce Link to comment
Scripting Moderators ds1-e Posted April 25, 2019 Scripting Moderators Share Posted April 25, 2019 1 hour ago, yce said: Salvar em server.lua ou client.lua? desculpe, eu sou novo em Scrpt Client. Link to comment
yce Posted April 25, 2019 Author Share Posted April 25, 2019 (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 April 25, 2019 by yce Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now