Apo Posted May 15, 2016 Share Posted May 15, 2016 hi guys please help me if player goto marker , marker is clean and marker only show for player function findvehs(thePlayer, commandName, id) if not (id) then outputChatBox("SYNTAX: /" .. commandName .. " [id]", thePlayer, 255, 194, 14) else local theVehicle = getElement("vehicle", tonumber(id)) if theVehicle then local rx, ry, rz = getVehicleRotation (theVehicle) local x, y, z = getElementPosition(theVehicle) marker = createMarker( x, y, z, "corona", 4, 255, 0, 255, 150, getRootElement(thePlayer )) createBlip( x, y, z, 0, 2, 255, 0, 255, 255) end end end end addCommandHandler("findveh", findvehs, false, false) Link to comment
ViRuZGamiing Posted May 15, 2016 Share Posted May 15, 2016 I guess there's a typo, getElement, probably had to be, getElementData. Link to comment
Apo Posted May 15, 2016 Author Share Posted May 15, 2016 no my script fixed i am only need delete marker and only player see marker Link to comment
Bean666 Posted May 15, 2016 Share Posted May 15, 2016 what do you mean, explain better. Link to comment
Apo Posted May 15, 2016 Author Share Posted May 15, 2016 function marker(player) local x, y, z = getElementPosition(player) marker = createMarker( x, y, z, "cylinder", 2, 255, 0, 0, 150, getRootElement(thePlayer )) blip= createBlip( x, y, z, 0, 2, 255, 0, 255, 255) end addCommandHandler("marker", marker) i need 2 help 1. I can just see marker 2. if i am near or goto marker , marker deleted Link to comment
Feher Posted May 15, 2016 Share Posted May 15, 2016 Hey, try this function marker(player) local x, y, z = getElementPosition(player) markero = createMarker( x+5, y, z, "cylinder", 2, 255, 0, 0, 150, getRootElement()) setElementVisibleTo(markero, getRootElement(), false) setElementVisibleTo(markero, player, true) blip= createBlipAttachedTo(markero, 0, 2, 255, 0, 255, 255) end addCommandHandler("marker", marker) function markhit (element) if (source == markero) then destroyElement(markero) destroyElement(blip) end end addEventHandler("onMarkerHit", root, markhit) 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