GetPedSimplestTask: Difference between revisions
Jump to navigation
Jump to search
m (link to getPedTask) |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
{{Client function}} | {{Client function}} | ||
This function is used to get the name of a specified ped's current simplest [[task]].<br> | This function is used to get the name of a specified ped's current simplest [[task]].<br> | ||
{{Note|See [[getPedTask]] to get a ped's task.}} | |||
See [[getPedTask]] to get a | |||
==Syntax== | ==Syntax== | ||
Line 17: | Line 16: | ||
==Example== | ==Example== | ||
This example prints the name of a player's simplest task to the chat, when they use the " | This example prints the name of a player's simplest task to the chat, when they use the "simplestTask" command. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function | function showSimplestTask() | ||
local taskName = getPedSimplestTask(localPlayer) | |||
local playerName = getPlayerName(localPlayer) | |||
outputChatBox(playerName.."'s simplest task is: "..taskName) | |||
end | end | ||
addCommandHandler ( " | addCommandHandler("simplestTask", showSimplestTask) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client_ped_functions}} | {{Client_ped_functions}} |
Latest revision as of 13:58, 26 November 2021
This function is used to get the name of a specified ped's current simplest task.
Syntax
string getPedSimplestTask ( ped thePed )
Required Arguments
Returns
Returns a string representing the name of the ped's simplest, active task.
Example
This example prints the name of a player's simplest task to the chat, when they use the "simplestTask" command.
function showSimplestTask() local taskName = getPedSimplestTask(localPlayer) local playerName = getPlayerName(localPlayer) outputChatBox(playerName.."'s simplest task is: "..taskName) end addCommandHandler("simplestTask", showSimplestTask)
See Also
- canPedBeKnockedOffBike
- getPedAnalogControlState
- getPedAnimation
- getPedBonePosition
- getPedCameraRotation
- getPedControlState
- getPedMoveState
- getPedOxygenLevel
- getPedSimplestTask
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedVoice
- getPedWeaponMuzzlePosition
- givePedWeapon
- isPedBleeding
- isPedDoingTask
- isPedReloadingWeapon
- isPedTargetingMarkerEnabled
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedBleeding
- setPedCameraRotation
- setPedCanBeKnockedOffBike
- setPedControlState
- setPedEnterVehicle
- setPedExitVehicle
- IsPedFootBloodEnabled
- setPedFootBloodEnabled
- setPedLookAt
- setPedOxygenLevel
- setPedTargetingMarkerEnabled
- setPedVoice
- Shared
- addPedClothes
- getPedClothes
- removePedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedFightingStyle
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getPedContactElement
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle