isPlayerMapVisible | Multi Theft Auto: Wiki Skip to content

isPlayerMapVisible

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function checks if the local player has their map showing (F11).

Syntax

bool isPlayerMapVisible ( )

Returns

  • bool: value

Returns true if the player has the map visible, false otherwise.

Code Examples

shared
function 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

See Also