Chlorek Posted July 4, 2011 Share Posted July 4, 2011 Sup again people. I scripted this: function setItem(up_down) local gracz = getLocalPlayer() if(tonumber(up_down) == 1)then nastepnyBlok() elseif(tonumber(up_down) == -1)then poprzedniBlok() end end addEventHandler( "onClientMouseWheel", getRootElement(), setItem) ...and when I use mouse wheel function isn't started. What's wrong in the code? #EDIT Ok I scripted everything again and works but I have one problem - so it detect scrolling only when I have any GUI opened, and how to do that it detect scrolling all time? Link to comment
JR10 Posted July 4, 2011 Share Posted July 4, 2011 This event is triggered each time the user scrolls his mouse scroll on top of a GUI element. Link to comment
Chlorek Posted July 4, 2011 Author Share Posted July 4, 2011 Oh, so how to (if it is possible) to detect scrolling mouse wheel all time? Link to comment
Buffalo Posted July 4, 2011 Share Posted July 4, 2011 Ok I scripted everything again and works but I have one problem - so it detect scrolling only when I have any GUI opened, and how to do that it detect scrolling all time? Use bindKey with mouse_wheel_up mouse_wheel_down Link to comment
Chlorek Posted July 4, 2011 Author Share Posted July 4, 2011 Right, now it's working =] thanx guys for help. 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