IsPlayerMapVisible: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
{{Client function}} | {{Client function}} | ||
[[Image:MTAsa_Default_Map.png|thumb| | [[Image:MTAsa_Default_Map.png|thumb|224px|Screenshot of the default map]] | ||
This function checks if the local player has their map showing. | This function checks if the local player has their map showing. |
Revision as of 16:31, 23 June 2018
This function checks if the local player has their map showing.
Syntax
bool isPlayerMapVisible ()
Returns
Returns true if the player has the map visible, false otherwise.
Example
Click to collapse [-]
Example 1function checkMap() local text = (isPlayerMapVisible() and "You are currently viewing your map!") or "Your map is not visible!" outputChatBox(text, 255, 255, 0) -- output text end addCommandHandler("map", checkMap) -- add '/map' command to the check
Click to collapse [-]
Example 2function showMap() if isPlayerMapVisible() then outputChatBox("Radar closed", 0, 255, 0) forcePlayerMap(false) else outputChatBox("Viewing radar", 0, 255, 0) forcePlayerMap(true) end end addCommandHandler("showmap", showMap)
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