xXMADEXx Posted April 7, 2013 Posted April 7, 2013 Hey guys, idk why, but for some reason i just cannot figure this script out.... It wont give the ID addEventHandler("onClientClick",root, function (_,_,_,_,_,_,_,element) if (getElementType(element)=="object") then outputChatBox("ID: "..getElementID(element)) end end ) The Ultimate Lua Tutorial! | MTA PHP SDK
Castillo Posted April 7, 2013 Posted April 7, 2013 getElementID does not return the model of the object, for that you need to use getElementModel. addEventHandler ( "onClientClick", root, function ( _, _, _, _, _, _, _, element ) if ( element and getElementType ( element ) == "object" ) then outputChatBox ( "ID: ".. getElementModel ( element ) ) end end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
xXMADEXx Posted April 7, 2013 Author Posted April 7, 2013 getElementID does not return the model of the object, for that you need to use getElementModel. addEventHandler ( "onClientClick", root, function ( _, _, _, _, _, _, _, element ) if ( element and getElementType ( element ) == "object" ) then outputChatBox ( "ID: ".. getElementModel ( element ) ) end end ) ah, thanks The Ultimate Lua Tutorial! | MTA PHP SDK
Castillo Posted April 7, 2013 Posted April 7, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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