HU/canPedBeKnockedOffBike
Jump to navigation
Jump to search
This function checks if the given ped can fall off bikes.
Syntax
bool canPedBeKnockedOffBike ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:canBeKnockedOffBike(...)
- Counterpart: setPedCanBeKnockedOffBike
Required Arguments
- thePed: the ped you want to check.
Returns
Returns true if the ped can be knocked off bikes, false if he cannot or an invalid element was passed.
Example
This example adds a console command with which the local player can toggle whether he can fall off bikes.
function changeCanBeKnockedOff ( command ) -- lets players be knocked off bikes if it was set to false, true otherwise local bCanBeKnockedOff = canPedBeKnockedOffBike(localPlayer) setPedCanBeKnockedOffBike(localPlayer, not bCanBeKnockedOff) -- outputs the respective message outputChatBox( ('Now you %s be knocked off your bike.'):format(bCanBeKnockedOff and 'can\'t' or 'can') ) end addCommandHandler('knock', changeCanBeKnockedOff)
See Also
- HU/addPedClothes
- HU/canPedBeKnockedOffBike
- HU/createPed
- HU/getPedAmmoInClip
- HU/getPedAnalogControlState
- HU/getPedAnimation
- HU/getPedArmor
- HU/getPedBonePosition
- HU/getPedCameraRotation
- HU/getPedClothes
- HU/getPedContactElement
- HU/getPedControlState
- HU/getPedMoveState
- HU/getPedOccupiedVehicle
- HU/getPedOccupiedVehicleSeat
- HU/getPedOxygenLevel
- HU/getPedSimplestTask
- HU/getPedStat
- HU/getPedTarget
- HU/getPedTargetCollision
- HU/getPedTargetEnd
- HU/getPedTargetStart
- HU/getPedTask
- HU/getPedTotalAmmo
- HU/getPedVoice
- HU/getPedWalkingStyle
- HU/getPedWeapon
- HU/getPedWeaponMuzzlePosition
- HU/getPedWeaponSlot
- HU/getValidPedModels
- HU/givePedWeapon
- HU/isPedChoking
- HU/isPedDead
- HU/isPedDoingGangDriveby
- HU/isPedDoingTask
- HU/isPedDucked
- HU/isPedHeadless
- HU/isPedInVehicle
- HU/isPedOnFire
- HU/isPedOnGround
- HU/isPedWearingJetpack
- HU/killPed
- HU/removePedClothes
- HU/removePedFromVehicle
- HU/setAnalogControlState
- HU/setPedAimTarget
- HU/setPedAnalogControlState
- HU/setPedAnimation
- HU/setPedAnimationProgress
- HU/setPedCameraRotation
- HU/setPedCanBeKnockedOffBike
- HU/setPedControlState
- HU/setPedDoingGangDriveby
- HU/setPedFootBloodEnabled
- HU/setPedHeadless
- HU/setPedLookAt
- HU/setPedOnFire
- HU/setPedOxygenLevel
- HU/setPedStat
- HU/setPedTargetingMarkerEnabled
- HU/setPedVoice
- HU/setPedWalkingStyle
- HU/setPedWeaponSlot
- HU/warpPedIntoVehicle