Jump to content

Function isn't executed


Chlorek

Recommended Posts

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

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