IsPedChoking
From Multi Theft Auto: Wiki
This function checks if the specified ped is choking (coughing) or not. This happens as a result of weapons that produce smoke - smoke grenades, fire extinguisher and the spray can.
Syntax
bool isPedChoking ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:isChoking(...)
- Variable: .choking
- Counterpart: setPedChoking
Required Arguments
- thePed: The ped you wish to check
Returns
Returns true if the ped is choking, false otherwise.
Example
Click to collapse [-]
Server&ClientThis example checks if a random player is choking or not, and if so displays a message in the chat box.
local players = getElementsByType ( "player" ) local randomPlayer = players[math.random(#players)] if isPedChoking ( randomPlayer ) then outputChatBox ( getPlayerName ( randomPlayer ) .. " is choking. Keep away from those cigarettes!" ) end
See Also
- addPedClothes
- createPed
- getPedAmmoInClip
- getPedArmor
- getPedClothes
- getPedContactElement
- getPedFightingStyle
- getPedGravity
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedStat
- getPedTarget
- getPedTotalAmmo
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponSlot
- getValidPedModels
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- reloadPedWeapon
- removePedClothes
- removePedFromVehicle
- setPedAnimation
- setPedAnimationProgress
- setPedAnimationSpeed
- setPedArmor
- setPedChoking
- setPedDoingGangDriveby
- setPedFightingStyle
- setPedGravity
- setPedHeadless
- setPedOnFire
- setPedStat
- setPedWalkingStyle
- setPedWeaponSlot