IsPlayerMapForced

From Multi Theft Auto: Wiki
Revision as of 21:45, 8 October 2006 by MrJax (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function checks if the specified player's radar-map has been forced on or not.

Syntax

bool isPlayerMapForced ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the player's radar-map is forced on, false otherwise.

Example

This example forces a players radar-map on for 10seconds if it hasnt been already

player = getPlayerByNick ( "dave" ) -- do we have a player named "dave"
if ( player ) then
  if ( isPlayerMapForced ( player ) == false ) then -- if his radar-map isn't already forced on
    forcePlayerMap ( player, true ) -- force it on
    setTimer ( "forcePlayerMap", 10000, 1, false ) -- force it off in 10secs
  end
end

See Also