Jump to content

onMarkerHit <--> marker attached to vehicle


Puma

Recommended Posts

Got a problem:

"onMarkerHit" isn't triggered when something hits a marker that is attached to a vehicle. Same problem with colshapes: I attach the colshape to a vehicle, but when you drive through that vehicle with another vehicle (using ghostmode, d'oh), "onColShapeHit" is not triggered.

I've had this problem before and I do think that the ability of attaching markers/colshapes to vehicles and let them trigger events could come in very helpful sometimes. The only option left for me is using a timer with a 50ms interval to check the distance between all players and do something if the distance is smaller than x... But that's like driving a Ferrari in the Desert because you can't get the doors open of your Range Rover...

Anyone got a better solution than my solution, or a solution for the whole problem: "onMarkerHit" or "onColShapeHit" is not triggered by hitting a marker or a colshape that is attached to a vehicle?

Link to comment

It's a known bug since early DP releases but hasn't been fixed yet. I would suggest you do it client-side - use onClientRender and change the position of the colshape or marker to where the vehicle is at the moment. After all, that's what MTA does with attached elements if not a timer.

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