ForcePlayerMap: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (add client function oop notice) |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool forcePlayerMap ( player thePlayer, bool forceOn )</syntaxhighlight> | <syntaxhighlight lang="lua">bool forcePlayerMap ( player thePlayer, bool forceOn )</syntaxhighlight> | ||
{{OOP||[[player]]:forceMap|mapForced|isPlayerMapForced}} | {{OOP||[[player]]:forceMap|mapForced|isPlayerMapForced|Client side, Player.forceMap(bool forceOn) is used on the class}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePlayer''': A [[player]] object referencing the specified player | *'''thePlayer''': A [[player]] object referencing the specified player |
Revision as of 17:58, 28 December 2014
This function is used to forcefully show a player's radar map.
Syntax
bool forcePlayerMap ( player thePlayer, bool forceOn )
OOP Syntax Help! I don't understand this!
- Method: player:forceMap(...)
- Variable: .mapForced
- Counterpart: isPlayerMapForced
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 the radar 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 radar 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
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState