SetPedDoingGangDriveby: Difference between revisions
Jump to navigation
Jump to search
(New page: {{Client function}} __NOTOC__ This function sets the driveby state of a ped. ==Syntax== <syntaxhighlight lang="lua"> bool setPedDoingGangDriveby ( ped ped, bool state ) </syntaxhighlight> ===Required Arguments=...) |
(No difference)
|
Revision as of 23:42, 2 May 2009
This function sets the driveby state of a ped.
Syntax
bool setPedDoingGangDriveby ( ped ped, bool state )
Required Arguments
- ped: the PED element whose state is to be changed
- state: the new visibility state
Returns
Returns true if the driveby state could be changed, false otherwise.
Example
This example turns on driveby mode when the local player types '/driveby'.
function setDoingDriveby ( ) -- we check if the gui element is visible if getPedWeapon ( getLocalPlayer () ) == 0 then -- if he got driveby mode off, turn it on setPedWeaponSlot( getLocalPlayer (), 4 ) setPedDoingGangDriveby( getLocalPlayer (), true ) else -- otherwise, turn it off setPedWeaponSlot( getLocalPlayer (), 0 ) setPedDoingGangDriveby( getLocalPlayer (), false ) end end addCommandHandler( "driveby", setDoingDriveby, false )
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