LiOneLMeSsIShoT Posted November 20, 2013 Posted November 20, 2013 Hello Everyone!!! I'm wanted to know the function which make sound when you move the mouse in buttom or tap..or any place which i need and i wanted to know it's Client side or Server side?? THANKS A LOT :)
xXMADEXx Posted November 20, 2013 Posted November 20, 2013 Side: client. Event: onClientGUIClick/onClientClick Function: playSound
LiOneLMeSsIShoT Posted November 21, 2013 Author Posted November 21, 2013 Side: client.Event: onClientGUIClick/onClientClick Function: playSound Alright..Thanks a lot for your help! but i'm wanted to sound starts when the mouse be in the button. not when the mouse click on it.
Dealman Posted November 21, 2013 Posted November 21, 2013 Alternatively, to make your life easier if you're using GUI - you can use those events; onClientMouseEnter onClientMouseLeave
LiOneLMeSsIShoT Posted November 21, 2013 Author Posted November 21, 2013 Thanks guys..but can you give me an example? please.
.:HyPeX:. Posted November 21, 2013 Posted November 21, 2013 You should try using the onClientClick with an if on the coords. Note: use this if you arent using Gui, as Gui functions would be ALOT easier. function Clicked(button,state,absoluteX,absoluteY) local x, y = guiGetScreenSize() if button == left then if state == down then if absoluteX == x/5.2 or absoluteX == x/5.1 then -- On wich part of the screen? right to left if absoluteY == y/5.2 or abosulteY == y/5.1 then -- On wich part of the screen? down to up DoShit -- Whatever you want on click end end end end end addEventHanlder("OnClientClick", getRootElement(), Clicked)
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