SetPedCanBeKnockedOffBike
From Multi Theft Auto: Wiki
This function controls if a ped can fall of his bike by accident - namely by banging into a wall.
Syntax
bool setPedCanBeKnockedOffBike ( ped thePed, bool canBeKnockedOffBike )
OOP Syntax Help! I don't understand this!
- Method: ped:setCanBeKnockedOffBike(...)
- Counterpart: canPedBeKnockedOffBike
Required Arguments
- thePed: the ped whose knockoffstatus is being changed
- canBeKnockedOffBike: true or false
Example
This example adds a console command with which the local player can toggle if he can fall off bikes.
function changeCanBeKnockedOff ( command ) -- The player should enter /knock if canPedBeKnockedOffBike ( getLocalPlayer() ) then setPedCanBeKnockedOffBike ( getLocalPlayer(), false ) outputChatBox ( "Now you can't be knocked off your bike." ) else setPedCanBeKnockedOffBike ( getLocalPlayer(), true ) outputChatBox ( "Now you can be knocked off your bike." ) end end addCommandHandler ( "knock", changeCanBeKnockedOff )
See Also
- getPedAmmoInClip
- getPedAnalogControlState
- getPedAnimation
- getPedArmor
- getPedBonePosition
- getPedCameraRotation
- getPedClothes
- getPedContactElement
- getPedControlState
- getPedFightingStyle
- getPedMoveState
- getPedOccupiedVehicle
- getPedOccupiedVehicleSeat
- getPedOxygenLevel
- getPedSimplestTask
- getPedStat
- getPedTarget
- getPedTargetCollision
- getPedTargetEnd
- getPedTargetStart
- getPedTask
- getPedTotalAmmo
- getPedVoice
- getPedWalkingStyle
- getPedWeapon
- getPedWeaponMuzzlePosition
- getPedWeaponSlot
- getValidPedModels
- givePedWeapon
- isPedChoking
- isPedDead
- isPedDoingGangDriveby
- isPedDoingTask
- isPedDucked
- isPedHeadless
- isPedInVehicle
- isPedOnFire
- isPedOnGround
- isPedWearingJetpack
- killPed
- removePedClothes
- removePedFromVehicle
- setAnalogControlState
- setPedAimTarget
- setPedAnalogControlState
- setPedAnimation
- setPedAnimationProgress
FROM VERSION 1.5.7 r19626 ONWARDS
FROM VERSION 1.5.7 r19626 ONWARDS
- setPedFootBloodEnabled
- setPedHeadless
- setPedLookAt
- setPedOnFire
- setPedOxygenLevel
- setPedStat
- setPedTargetingMarkerEnabled
- setPedVoice
- setPedWalkingStyle
- setPedWeaponSlot
- warpPedIntoVehicle