Jump to content

Help with setPlayerBlurLevel.


Feche1320

Recommended Posts

I have this:

  
addEvent("onMapStarting") 
addEventHandler("onMapStarting", getRootElement(), setblur) 
  
function setblur () 
    setTimer(blurroff, 2500, 1) 
end 
  
function blurroff() 
    for theKey,thePlayer in ipairs(getElementsByType("player")) do 
    setPlayerBlurLevel ( thePlayer , 0 ) 
end 
  

What it should do is disable the player blur level, by doing a loop, but it doesn't work..

Thanks.

Link to comment
  
function setblur ()  
    setTimer(blurroff, 2500, 1) 
end 
-- function must be created BEFORE you attach it as a handler, otherwise it'll trigger an error 
  
addEvent("onMapStarting") 
addEventHandler("onMapStarting", getRootElement(), setblur) 
  
function blurroff() 
    for theKey,thePlayer in ipairs(getElementsByType("player")) do 
      setPlayerBlurLevel ( thePlayer , 0 )   
    end -- you forgot this 
end 
  

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