Jump to content

[Help] Click on markers


Recommended Posts

Posted

hello guys .. i was wondering how to make the marker clickable ?

by using 'onClientClick' or other ways that may be valid

i know there is a lot of ways to make it by attaching objets or peds or whatever to the marker

but i want to know if there is a way to make it clickable without attaching anything to it ?

Posted
5 hours ago, Mr.Loki said:

getDistanceBetweenPoints3D use this to check if the marker is <, for example, 1m or 0.5m away from where the mouse was clicked in the world.

Markers have no collisions so you cannot click them.

yeah but you can create ped with 0 alpha for 1 mili second where mouse clicks once you are close enough to marker and then handle all that through onClientColShapeHit. This will make clickable markers possible really easy.

Posted (edited)
25 minutes ago, Mr.Loki said:

Won't that only work for client sided markers? @Fist

well you can do same thing on server side only need to get who made that ped on mouse click.

Edited by Fist

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