ForcePlayerMap

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

This function is used to force a player's radar-map to show (and stay showing)

Syntax

bool forcePlayerMap ( player thePlayer, bool forceOn )

Required Arguments

  • thePlayer: A player object referencing the specified player
  • forceOn: A boolean value representing whether or not the players radar-map will be forced on

Returns

Returns true if the player's radar-map was 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