IsPlayerDoingTask
Jump to navigation
Jump to search
This function checks if the specified player is carrying out a certain task.
Syntax
bool isPlayerDoingTask ( player thePlayer, string taskName )
Required Arguments
- thePlayer: A player object referencing the specified player.
- taskName: A string containing the name of the task you're checking for.
Returns
Returns true if the player is currently doing the task.
Example
This example forces a players radar-map on for 10seconds if it hasnt been already
addCommandHandler ( "amIDoingADriveby", "amIDoingADriveby" ) function amIDoingADriveby ( source, key ) if ( isPlayerDoingTask ( source, "TASK_SIMPLE_GANG_DRIVEBY" ) ) then outputChatBox ( getClientName ( source ) .. " is doing a driveby!!!" ) else outputChatBox ( getClientName ( source ) .. " is not doing a driveby" ) 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