Jump to content

onClientClick


xXMADEXx

Recommended Posts

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 
) 

Link to comment

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 
) 

Link to comment
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, :oops: thanks
Link to comment

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