forcePlayerMap | Multi Theft Auto: Wiki Skip to content

forcePlayerMap

Client-side
Server-side
Shared

Pair: isPlayerMapForced

This page is incomplete! Help wanted!

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


This function is used to forcefully show a player's map (F11).

Syntax

forcePlayerMap ( )

Code Examples

server

This example forces the map to show for the player named "dave" on for 10 seconds, if it hasn't been already.

-- Get the player named "dave"
dave = getPlayerFromName ( "dave" )
-- Make sure we found him
if ( dave ) then
if not isPlayerMapForced ( dave ) then -- if his map isn't already forced on
forcePlayerMap ( dave, true ) -- force it on
setTimer ( forcePlayerMap, 10000, 1, dave, false ) -- stop forcing in 10 seconds
end
end

See Also