SetPedFrozen: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 11: | Line 11: | ||
*'''thePed:''' The [[ped]] whose frozen state will be changed. | *'''thePed:''' The [[ped]] whose frozen state will be changed. | ||
*'''frozen:''' A [[bool]] value as to whether the ped is frozen or not. | *'''frozen:''' A [[bool]] value as to whether the ped is frozen or not. | ||
===Returns=== | |||
Returns ''true'' if the frozen state was set successfully, or ''false'' if invalid arguments were passed. | |||
==Example== | ==Example== |
Revision as of 20:57, 14 July 2009
This function freezes (or un-freezes) a pedestrian, meaning they cannot move, jump, aim, shoot, etcetera.
Syntax
bool setPedFrozen ( ped thePed, bool frozen )
Required Arguments
- thePed: The ped whose frozen state will be changed.
- frozen: A bool value as to whether the ped is frozen or not.
Returns
Returns true if the frozen state was set successfully, 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, command ) local frozen = getPedFrozen ( sourcePlayer ) setPedFrozen ( sourcePlayer, not frozen ) end addCommandHandler ( "togglefreeze", toggleFreeze )
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