Jump to content

help marker


Apo

Recommended Posts

Posted

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) 

only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله

Posted

I guess there's a typo, getElement, probably had to be, getElementData.

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted

no my script fixed

i am only need delete marker and only player see marker

only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله

Posted
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

only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله

Posted

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) 

Posted

reality thank you :x

only god (الله) اشهد ان لا اله الا الله واشهد ان محمد رسول الله

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