IsPedFrozen: Difference between revisions
Jump to navigation
Jump to search
(Created page with '__NOTOC__ {{Server client function}} This function retrieves whether the pedestrian is frozen or not. ==Syntax== <syntaxhighlight lang="lua"> bool isPedFrozen ( ped thePed ) </syntaxhighlight> ===Requ…') |
No edit summary |
||
Line 17: | Line 17: | ||
This example adds a 'togglefreeze' console command that lets players alternate their frozen state. | This example adds a 'togglefreeze' console command that lets players alternate their frozen state. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function toggleFreeze | function toggleFreeze ( sourcePlayer ) | ||
setPedFrozen ( sourcePlayer, not isPedFrozen ( sourcePlayer ) ) | |||
setPedFrozen ( sourcePlayer, not | |||
end | end | ||
addCommandHandler ( "togglefreeze", toggleFreeze ) | addCommandHandler ( "togglefreeze", toggleFreeze ) |
Revision as of 16:46, 9 October 2009
This function retrieves whether the pedestrian is frozen or not.
Syntax
bool isPedFrozen ( ped thePed )
Required Arguments
- thePed: The ped whose frozen state will be obtained.
Returns
Returns a bool indicating the pedestrians frozen state, or false if invalid arguments were passed.
Example
This example adds a 'togglefreeze' console command that lets players alternate their frozen state.
function toggleFreeze ( sourcePlayer ) setPedFrozen ( sourcePlayer, not isPedFrozen ( sourcePlayer ) ) end addCommandHandler ( "togglefreeze", toggleFreeze )
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