ManeXi Posted August 4, 2016 Posted August 4, 2016 (edited) I want to attach an event to only 1 certain marker, I have tried this: local eventMarker = createMarker(2031.0009765625, -1417.849609375, 18, "arrow", 2.0, 0, 255, 0, 200) addEventHandler("onPlayerMarkerHit", eventMarker, theFunction) but it doesn't work Edited August 4, 2016 by Guest Interested on a paid 3D modder? My Skype: awdsasda.sdasdaad
Walid Posted August 4, 2016 Posted August 4, 2016 Replace "onPlayerMarkerHit" with "onMarkerHit" . Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
EstrategiaGTA Posted August 4, 2016 Posted August 4, 2016 Use this: local eventMarker = createMarker(2031.0009765625, -1417.849609375, 18, "arrow", 2.0, 0, 255, 0, 200) addEventHandler("onPlayerMarkerHit", getRootElement(), theFunction) And in the function add a check like this, to see if the marker that was hit is eventMarker: theFunction (markerHit) if markerHit == eventMarker then --your code end end
Bonus Posted August 4, 2016 Posted August 4, 2016 Better do what Walid told you, better for the performance.
ManeXi Posted August 4, 2016 Author Posted August 4, 2016 It worked thanks alot Interested on a paid 3D modder? My Skype: awdsasda.sdasdaad
EstrategiaGTA Posted August 4, 2016 Posted August 4, 2016 Better do what Walid told you, better for the performance. I gave him the solution for the event he was using, he did not ask for better perfomance...
Bonus Posted August 4, 2016 Posted August 4, 2016 Better do what Walid told you, better for the performance. I gave him the solution for the event he was using, he did not ask for better perfomance... And I didn't say your solution is wrong. Just wanted to say that he should better use the other event
Captain Cody Posted August 4, 2016 Posted August 4, 2016 When helping other people, try to give them solutions for better performance, while also fixing their original problems, so they can learn from what you've done. And use the better answer in the future.
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