Jump to content

setPlayerBlurLevel ???


DazzaJay

Recommended Posts

So yeah, i was hunting around on the MTA Wiki and i came across this:

function changeBlurLevel(playerSource,command,blur) 
  
  if blur>255 or blur<0 then 
    outputChatBox("Enter a value between 0 - 255.", playerSource) 
  else 
    setPlayerBlurLevel(playerSource, blur) 
    outputChatBox("Blur level set to: "..blur, playerSource) 
  end 
end 
  
addCommandHandler("blur", changeBlurLevel) 

The question is, can this peice of code be used to disable all players speed blur affect.

and if so, how/ what would be the best way to go about that.

Link to comment

I'm not quite sure how this function works, but if it's a set-it-and-forget-it type function, this should work.

 function changeBlurLevel() 
    setPlayerBlurLevel(source, 0) 
end 
  
addEventHandler("onPlayerJoin", getRootElement(), changeBlurLevel) 

Edited by Guest
Link to comment
function changeBlurLevel() 
    setPlayerBlurLevel ( source, 0 ) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), changeBlurLevel ) 
  
function scriptStart() 
    setPlayerBlurLevel ( getRootElement(), 0) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource() ), scriptStart ) 

Link to comment
Wow Norby. That is TOO complicated for such a simple task. Although your syntax highlighting is pretty.

Why too complicated ? That's about the minimum code for both situations you need to handle - game mode start and players joining.

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