SetPlayerBlurLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Max value is 255.
{{Server function}}
__NOTOC__
Sets the motion blur level on the clients screen. Accepts a value between 0 and 255.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
bool setPlayerBlurLevel ( player thePlayer, int level )
</syntaxhighlight>


===Required Arguments===
*'''thePlayer:''' The [[player]] whose blue level will be changed.
*'''blur:''' The level to set the blur to


<syntaxhighlight lang="lua">
==Example==
bool setPlayerBlurLevel ( player thePlayer, int level )
This example allows the player to set their blur level via a command
<syntaxhighlight lang="lua">  
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)
</syntaxhighlight>
</syntaxhighlight>
[[Category:Incomplete]]
[[Category:Incomplete]]

Revision as of 19:30, 31 January 2008

Sets the motion blur level on the clients screen. Accepts a value between 0 and 255.

Syntax

bool setPlayerBlurLevel ( player thePlayer, int level )

Required Arguments

  • thePlayer: The player whose blue level will be changed.
  • blur: The level to set the blur to

Example

This example allows the player to set their blur level via a command

 
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)