GetPlayerMapOpacity: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} {{New feature/item|3.0159|1.5.8|20945|This function allows to get the opacity of the radar map (F11).}} ==Syntax== <syntaxhighlight lang="lua">...") |
Fernando187 (talk | contribs) No edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{ | {{Added feature/item|1.5.9|1.5.8|20945|This function allows to get the opacity of the player map (F11).}} | ||
==Syntax== | ==Syntax== | ||
Line 7: | Line 7: | ||
int getPlayerMapOpacity ( ) | int getPlayerMapOpacity ( ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ | {{OOP||[[player]].getMapOpacity}} | ||
===Returns=== | ===Returns=== | ||
Returns an [[integer]] value from 0 to 255, where 0 is fully transparent and 255 is fully opaque. | Returns an [[integer]] with a value from 0 to 255, where 0 is fully transparent and 255 is fully opaque. | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example implements a command that tells you what your current map opacity is. | |||
<syntaxhighlight lang="lua"> | |||
function showMapOpacity() | |||
-- We get the map opacity value | |||
local mapOpacity = getPlayerMapOpacity() | |||
-- We tell what the map opacity is to the player | |||
outputChatBox("Your map's opacity is at "..mapOpacity, 0, 255, 0) | |||
end | |||
addCommandHandler("mapopacity", showMapOpacity) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | ==See Also== | ||
{{Client_player_functions}} | {{Client_player_functions}} |
Latest revision as of 11:49, 9 November 2024
This function allows to get the opacity of the player map (F11).
Syntax
int getPlayerMapOpacity ( )
OOP Syntax Help! I don't understand this!
- Method: player.getMapOpacity(...)
Returns
Returns an integer with a value from 0 to 255, where 0 is fully transparent and 255 is fully opaque.
Example
Click to collapse [-]
ClientThis example implements a command that tells you what your current map opacity is.
function showMapOpacity() -- We get the map opacity value local mapOpacity = getPlayerMapOpacity() -- We tell what the map opacity is to the player outputChatBox("Your map's opacity is at "..mapOpacity, 0, 255, 0) end addCommandHandler("mapopacity", showMapOpacity)
See Also
- getLocalPlayer
- getPlayerMapBoundingBox
- getPlayerMapOpacity
- isPlayerMapVisible
- resetBlurLevel
- isPlayerHudComponentVisible
- Shared
- 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