LiOneLMeSsIShoT Posted November 20, 2013 Share 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 :) Link to comment
xXMADEXx Posted November 20, 2013 Share Posted November 20, 2013 Side: client. Event: onClientGUIClick/onClientClick Function: playSound Link to comment
LiOneLMeSsIShoT Posted November 21, 2013 Author Share 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. Link to comment
Dealman Posted November 21, 2013 Share Posted November 21, 2013 Alternatively, to make your life easier if you're using GUI - you can use those events; onClientMouseEnter onClientMouseLeave Link to comment
LiOneLMeSsIShoT Posted November 21, 2013 Author Share Posted November 21, 2013 Thanks guys..but can you give me an example? please. Link to comment
.:HyPeX:. Posted November 21, 2013 Share 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) 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