Arsilex Posted July 2, 2013 Share Posted July 2, 2013 local myLabel = guiCreateLabel ( 0, 0, 1, 1, "", true ) function addLabelOnClick ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( clickedElement ) then if getElementData(localPlayer, "mirarid.on") == true then local elementType = getElementModel ( clickedElement ) local elementType2 = getElementType ( clickedElement ) guiSetText ( myLabel, "Type: "..elementType2.." ID: "..elementType ) guiSetPosition ( myLabel, absoluteX, absoluteY, false ) setTimer ( guiSetText, 5000, 1, myLabel, "" ) end end end addEventHandler ( "onClientClick", getRootElement(), addLabelOnClick ) why that not say model of objects ? Link to comment
Castillo Posted July 2, 2013 Share Posted July 2, 2013 Any errors? is the "mirarid.on" element data set? Link to comment
Arsilex Posted July 2, 2013 Author Share Posted July 2, 2013 any errors only work whit player vehicle and ped Link to comment
Castillo Posted July 2, 2013 Share Posted July 2, 2013 You're clicking a world object? Link to comment
Castillo Posted July 2, 2013 Share Posted July 2, 2013 That won't work. You must combine it with this function: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight Link to comment
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