SetPlayerBlurLevel: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(8 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{Server function}} | {{Server client function}} | ||
__NOTOC__ | __NOTOC__ | ||
Sets the motion blur level on the clients screen. Accepts a value between 0 and 255. | Sets the motion blur level on the clients screen. Accepts a value between 0 and 255. | ||
==Syntax== | ==Syntax== | ||
<section name="Server" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setPlayerBlurLevel ( player thePlayer, int level ) | bool setPlayerBlurLevel ( player thePlayer, int level ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[player]]:setBlurLevel|blurLevel|getPlayerBlurLevel}} | |||
===Required Arguments=== | |||
*'''thePlayer:''' The [[player]] whose blur level will be changed. | |||
*'''level:''' The level to set the blur to (default: 36) | |||
</section> | |||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
bool setBlurLevel ( int level ) | |||
</syntaxhighlight> | |||
{{OOP||[[Player]].setBlurLevel||getPlayerBlurLevel}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''level:''' The level to set the blur to (default: 36) | |||
*'''level:''' The level to set the blur to (default: | </section> | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | |||
This example allows the player to set their blur level via a command | This example allows the player to set their blur level via a command | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function changeBlurLevel(playerSource,command,blur) | 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 | end | ||
addCommandHandler("blur", changeBlurLevel) | addCommandHandler("blur", changeBlurLevel) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Player functions}} | {{Player functions}} |
Latest revision as of 22:05, 18 November 2017
Sets the motion blur level on the clients screen. Accepts a value between 0 and 255.
Syntax
Click to collapse [-]
Serverbool setPlayerBlurLevel ( player thePlayer, int level )
OOP Syntax Help! I don't understand this!
- Method: player:setBlurLevel(...)
- Variable: .blurLevel
- Counterpart: getPlayerBlurLevel
Required Arguments
- thePlayer: The player whose blur level will be changed.
- level: The level to set the blur to (default: 36)
Click to collapse [-]
Clientbool setBlurLevel ( int level )
OOP Syntax Help! I don't understand this!
- Method: Player.setBlurLevel(...)
- Counterpart: getPlayerBlurLevel
Required Arguments
- level: The level to set the blur to (default: 36)
Example
Click to collapse [-]
ServerThis 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
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState