mint3d Posted December 15, 2013 Share Posted December 15, 2013 Ok I have this and I want to know how to destroy it with the command /deletemarker function CreateFinishingMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", CreateMarker ) Link to comment
PaiN^ Posted December 15, 2013 Share Posted December 15, 2013 function CreateFinishingMarker( thePlayer, commandName ) if thePlayer then local x, y, z = getElementPosition( thePlayer ) theMarker = createMarker( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if theMarker then addCommandHandler( "destroymarker", destroy ) outputConsole( "Marker created successfully", thePlayer ) else outputConsole( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", CreateFinishingMarker ) function destroy( ) destroyElement( theMarker ) removeCommandHandler( "destroymarker", destroy ) end 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