Jump to content

Movable Images


Dice

Recommended Posts

  
addEventHandler ( "onClientGUIMouseDown", root, dragDown ) -- < that is embedded within onClientResourceStart because that is where GUI variables are 
function dragDown ( button, x, y ) 
    if button == "left" then 
        if source == main then 
            outputChatBox ( "124" ) 
            wX, wY = guiGetPosition ( maun, false ) 
            z = x - wX 
            s = y - wY 
            addEventHandler ( "onClientCursorMove", root, 
                function(_,_,a,b) 
                    if ftamainp then 
                        guiSetPosition ( main, a - z, b - s, false ) 
                    end 
                end 
            ) 
        end 
    end 
end 

It works, but I can't figure out how to remove the onClientCursorMove when onClientGUIMouseUp

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