Jump to content

clearElementParent


Recommended Posts

Posted

Is it possible to clear/remove the setElementParent? 

function onVehAttach(towTruck)
	setElementParent ( towTruck, source )
	outputChatBox ("Debug Line")
end
addEventHandler("onTrailerAttach", getRootElement(), onVehAttach)

function onVehDetach(towTruck)
	clearElementParent ( towTruck, source )
--	I know this function doesn't exist but it's just a example.
end
addEventHandler("onTrailerDetach", getRootElement(), onVehDetach)

 

Posted

Use root element as parent or resourceRoot or getResourceDynamicElementRoot(resource), see what one meets your needs

"El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más".

Att: -|TG|-Mister[Q]<.

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