GetPlayerBlurLevel: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server function}}
{{Server client function}}


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


==Syntax==
==Syntax==
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
int getPlayerBlurLevel ( player thePlayer )
int getPlayerBlurLevel ( player thePlayer )
Line 13: Line 14:


===Returns===
===Returns===
Returns ''integer'' containing the player's blur level, ''false'' if an invalid player was given.
Returns the player's blur level if successful, ''false'' if an invalid player was given.
</section>
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
int getBlurLevel ()
</syntaxhighlight>
 
===Required Arguments===
''None''
 
===Returns===
Returns the local blur level.
</section>


==Example==  
==Example==
<section name="Server" class="server" show="true">
This example adds a command ''blurlevel'' with which you can check your current blur level.
This example adds a command ''blurlevel'' with which you can check your current blur level.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 26: Line 40:
addCommandHandler("blurlevel", checkBlurLevel)
addCommandHandler("blurlevel", checkBlurLevel)
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Player functions}}
{{Player functions}}

Revision as of 20:43, 29 March 2009

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

Syntax

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

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 ()

Required Arguments

None

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