Jump to content

O erro é o seguinte quando o player entra, ele entra com colete e não com vida.


Recommended Posts

function onClientPlayerJoin()
	setPlayerNametagShowing(source, false)
end
addEventHandler("onClientPlayerJoin", root, onClientPlayerJoin)

function drawHPBar( x, y, v, d)
	if(v < 0.0) then
		v = 0.0
	elseif(v > 100.0) then
		v = 100.0
	end
	 dxDrawRectangle(x - 21, y, 42, 5, tocolor(0, 0, 0, 250 - d))
  dxDrawRectangle(x - 20, y + 1, v / 2.5, 3, tocolor((100 - v) * 1.0, v * 255, 255, 255 - d))
end

function drawArmourBar( x, y, v, d)
	if(v < 0.0) then
		v = 0.0
	elseif(v > 100.0) then
		v = 100.0
	end
	dxDrawRectangle(x - 21, y, 42, 5, tocolor(0, 0, 0, 250 - d))
  dxDrawRectangle(x - 20, y + 1, v / 2.5, 3, tocolor(30, 180, 65, 255 - d))
end

 

Edited by Lord Henry
Código convertido de HTML para Lua.
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...