GetPlayerTask
Jump to navigation
Jump to search
This function is used to get the current task-name of a certain type for a player.
Syntax
string getPlayerTask ( player thePlayer, string priority, int type )
Required Arguments
- thePlayer: The player whose task you want to retrieve.
- priority: A string determining which block of tasks you want to retrieve it from. (must be "priority" or "secondary")
- type: An integer value representing the task-type (or slot) you want to get the task from.
Returns
Returns a string representing the name of the player's task of that type.
Example
This example blows up any vehicle a specified player targets (aims at)
addCommandHandler ( "task", "task" ) function task ( source, key, priority, type ) task = getPlayerTask ( source, priority, type ) taskName = "none" if ( task ) then taskName = task end outputChatBox ( getClientName ( source ) .. "'s " .. priority .. "(" .. type .. ") task is: " .. taskName ) 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