IsPlayerMapForced
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 10 seconds if it hasn't been already.
function forceMapForPlayer ( callingPlayer, command, whoNick ) local who = getPlayerFromNick ( whoNick ) -- Look up the specified player if ( who ) then if ( not isPlayerMapForced ( who ) ) then -- if his radar map isn't already forced on forcePlayerMap ( who, true ) -- force it on setTimer ( forcePlayerMap, 10000, 1, who, false ) -- force it off in 10secs outputChatBox("Forcing Map for " .. whoNick, callingPlayer) -- output a message to the one who entered the command else outputChatBox("Map already forced for " .. whoNick, callingPlayer) -- if the map is already forced, output a message end else outputChatBox("Couldn't find " .. whoNick,callingPlayer) -- if the player wasn't found, output a message end end addCommandHandler("forceMap", forceMapForPlayer) -- add a command handler
See Also
- forcePlayerMap
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerBlurLevel
- getPlayerCount
- getPlayerFromName
- getPlayerIdleTime
- getPlayerIP
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerScriptDebugLevel
- getPlayerSerial
- getPlayerTeam
- getPlayerVersion
- getPlayerWantedLevel
- getRandomPlayer
- givePlayerMoney
- isPlayerMapForced
- isPlayerMuted
- isPlayerNametagShowing
- isVoiceEnabled
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerBlurLevel
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerMuted
- setPlayerName
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- setPlayerScriptDebugLevel
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerMoney
- takePlayerScreenShot