-.Paradox.- Posted November 2, 2013 Posted November 2, 2013 (edited) Hello, i want to create a dxRectangle and show in it the player health here is my code i got a error in debugscript 3 WARNING: Hud/hud.lua:65: Bad argument @ 'dxDrawRectangle' [Expected bool at argument 6, got number '-16745728'] dxDrawRectangle(1107, 54, 211, 13, tocolor(0, 0, 0, 255), true) dxDrawRectangle(" "..phealth.." ",1108, 55, 209, 11, tocolor(255, 0, 0, 255), true) Edited November 2, 2013 by Guest If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted November 2, 2013 Author Posted November 2, 2013 Yes local phealth = math.floor (getElementHealth ( getLocalPlayer() )) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Cadell Posted November 2, 2013 Posted November 2, 2013 I think there no need to use math for getting health just use getElementHealth (localPlayer) then it start work fine if tell me ill make u that Script Trading Status Successful Trading : 26 Scam : 0 On Sale : Banking System SQL Based On Sale : Housing System MySQL Based Download and Support my new script on Community : http://community.mtasa.com/index.php?p=resources&s=details&id=11686 SQL Based Housing
codeluaeveryday Posted November 2, 2013 Posted November 2, 2013 I'm pretty sure this is all your wanted? local pHealth = getElementHealth(localPlayer) if pHealth > 100 then pHealth = pHealth / 2 end dxDrawRectangle(1107, 54, 211, 13, tocolor(0, 0, 0, 255), true) dxDrawRectangle(1108, 55, 209*(pHealth/100), 11, tocolor(255, 0, 0, 255), true) Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
-.Paradox.- Posted November 2, 2013 Author Posted November 2, 2013 Thanks working but there is a error in debug i will send you a pic in skype If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
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