Tails Posted June 9, 2016 Posted June 9, 2016 Hello, I've tried many different things (including processLineOfSight) but it does not detect the marker element. It's going right through it. There's no problem with objects, though. Is there any way to detect markers with a mouse click? function pickupItem(button,state,_,_,x,y,z,clickedElem) if button == "left" and state == "down" and getKeyState("e") then if isElement(clickedElem) then if getElementType(clickedElem) == "marker" then outputChatBox("hit marker") end end end end addEventHandler("onClientClick",root,pickupItem) Discord: its.tails
Captain Cody Posted June 9, 2016 Posted June 9, 2016 It's because the marker has no collisions onClientClick and proccessLineOfSight both rely on collision with the object.
Tails Posted June 9, 2016 Author Posted June 9, 2016 So, is there no other way then? Discord: its.tails
Captain Cody Posted June 9, 2016 Posted June 9, 2016 hm.. You could connect an object to the marker maybe. And use getElementAttachedTo
Anubhav Posted June 9, 2016 Posted June 9, 2016 hm.. You could connect an object to the marker maybe. And usegetElementAttachedTo Right! Make a invisible ped. Not really attach it, you could probably use setElementParent and then getElementParent? createPed setElementAlpha setElementParent getElementParent See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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