SetPlayerBlurLevel

From Multi Theft Auto: Wiki
Revision as of 18:27, 24 June 2009 by Arc (talk | contribs)
Jump to navigation Jump to search

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

Syntax

Click to collapse [-]
Server
bool setPlayerBlurLevel ( player thePlayer, int level )

Required Arguments

  • thePlayer: The player whose blur level will be changed.
  • level: The level to set the blur to (default: 38)
Click to collapse [-]
Client
bool setBlurLevel ( int level )

Required Arguments

  • level: The level to set the blur to (default: 38)

Example

Click to collapse [-]
Server

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

 
function changeBlurLevel ( playerSource, command, blur )
    blur = tonumber(blur)
    if not blur or 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)

See Also