Jump to content

Give armor & HP when hit the mark


Recommended Posts

Hi, here you go. - You need to use an EventHandler to make this work.

local myMarker = createMarker ( xyz, "cylinder", 1, 255, 255, 0, 170 ) -- replace xyz with your exact coordinates.

function giveMedicals(hitplayer, dimension)
	if isElement(hitplayer) and getElementType(hitplayer) == "player" then
		setElementHealth(hitplayer, 100)
        	setPedArmor(hitplayer, 100)
	end
end
addEventHandler( "onMarkerHit", myMarker, giveMedicals )

 

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...