Jump to content

help a bit.


Bean666

Recommended Posts

why when i step on the marker with a vehicle it still destroys the marker? all i want is if i'm in a vehicle it will not destroy the marker.

this is the function.

function crtmarker ( ) 
    marker = createMarker ( x, y, z, "cylinder", 1.5, 255, 255, 255, 255 ) 
addEventHandler ( "onMarkerHit", marker, MarkerHit ) 
end 


function MarkerHit (hitPlayer, matchingDimension) 
local player = getPedOccupiedVehicle(hitPlayer)
if (player) then
return end
destroyElement(marker) 
end

 

Edited by Shaman123
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...