GetPlayerBlurLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Deleted client's "Required Arguments" part, there are no required arguments for client.)
(→‎Syntax: OOP syntax added)
Line 9: Line 9:
int getPlayerBlurLevel ( player thePlayer )
int getPlayerBlurLevel ( player thePlayer )
</syntaxhighlight>
</syntaxhighlight>
 
{{OOP||[[player]]:getBlurLevel|blurLevel|setPlayerBlurLevel}}
===Required Arguments===
===Required Arguments===
*'''thePlayer:''' The [[player]] whose blur level you want to check.
*'''thePlayer:''' The [[player]] whose blur level you want to check.

Revision as of 05:26, 15 July 2014

This function allows you to check the current blur level of a specified player.

Syntax

Click to collapse [-]
Server
int getPlayerBlurLevel ( player thePlayer )

OOP Syntax Help! I don't understand this!

Method: player:getBlurLevel(...)
Variable: .blurLevel
Counterpart: setPlayerBlurLevel


Required Arguments

  • thePlayer: The player whose blur level you want to check.

Returns

Returns the player's blur level if successful, false if an invalid player was given.

Click to collapse [-]
Client
int getBlurLevel ()

Returns

Returns the local blur level.

Example

Click to collapse [-]
Server

This example adds a command blurlevel with which you can check your current blur level.

function checkBlurLevel( playerSource )
    local blur = getPlayerBlurLevel( playerSource )
    if blur then
        outputChatBox( "Blur level: " .. blur, playerSource )
    end
end
addCommandHandler("blurlevel", checkBlurLevel)

See Also