IsPedDead: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server function}} This function checks if the specified ped is dead or not. ==Syntax== <syntaxhighlight lang="lua">bool isPedDead ( ped thePed )</syntaxhighlight> ===Required Arguments=== * '''the...) |
(Added OOP syntax) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Server_client function}} | ||
This function checks if the specified [[ped]] is dead or not. | This function checks if the specified [[ped]] is dead or not. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool isPedDead ( ped thePed )</syntaxhighlight> | <syntaxhighlight lang="lua">bool isPedDead ( ped thePed )</syntaxhighlight> | ||
{{OOP||[[ped]]:isDead|dead}} | |||
===Required Arguments=== | ===Required Arguments=== |
Latest revision as of 17:24, 26 November 2014
This function checks if the specified ped is dead or not.
Syntax
bool isPedDead ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:isDead(...)
- Variable: .dead
Required Arguments
- thePed: the ped you want to check up on.
Returns
Returns true if the ped is dead, false otherwise.
Example
Click to collapse [-]
ServerThis example allows a player to use the command 'amidead' to see if they are dead or not.
--Check if player is alive or dead and let them know in the chat box function deathCheck ( thePlayer, commandName ) if ( isPedDead ( thePlayer ) ) then outputChatBox ( "You're dead... prepare to become a zombie.", thePlayer ) else outputChatBox ( "Count your lucky stars, you're alive.", thePlayer ) end end addCommandHandler ( "amidead", deathCheck )
See Also
- 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