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__
{{Server function}}
This function allows you to check the current blur level of a specified [[player]].
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
int getPlayerBlurLevel ( player thePlayer )
int getPlayerBlurLevel ( player thePlayer )
</syntaxhighlight>
</syntaxhighlight>
[[Category:Incomplete]]
 
===Required Arguments===
*'''thePlayer:''' The [[player]] whose blur level you want to check.
 
===Returns===
Returns ''integer'' containing the player's blur level, ''false'' if an invalid player was given.


==Example==  
==Example==  
<!-- Explain what the example is in a single sentance -->
This example adds a command ''blurlevel'' with which you can check your current blur level.
This will show the blur level to the player.
<!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized -->
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function changeBlurLevel(playerSource)
function checkBlurLevel( playerSource )
     local blur = getPlayerBlurLevel(playerSource)
     local blur = getPlayerBlurLevel( playerSource )
     outputChatBox("Blur level: " .. blur, playerSource)
     if blur then
        outputChatBox( "Blur level: " .. blur, playerSource )
    end
end
end
addCommandHandler("blurlevel", changeBlurLevel)
addCommandHandler("blurlevel", checkBlurLevel)
-- Type /blurlevel to check the blur level
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{Player functions}}

Revision as of 13:53, 5 April 2008

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

Syntax

int getPlayerBlurLevel ( player thePlayer )

Required Arguments

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

Returns

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

Example

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