IsPedDoingGangDriveby: Difference between revisions
Jump to navigation
Jump to search
m (Modernized the example.) |
(Added OOP syntax) |
||
Line 7: | Line 7: | ||
bool isPedDoingGangDriveby ( ped thePed ) | bool isPedDoingGangDriveby ( ped thePed ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[ped]]:isDoingGangDriveby|doingGangDriveby}} | |||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 17:23, 26 November 2014
This function checks if the ped is in the driveby state.
Syntax
bool isPedDoingGangDriveby ( ped thePed )
OOP Syntax Help! I don't understand this!
- Method: ped:isDoingGangDriveby(...)
- Variable: .doingGangDriveby
Required Arguments
- thePed: The ped element whose state is to be checked.
Returns
Returns true if the driveby state is enabled, false otherwise.
Example
Click to collapse [-]
ClientThis example turns on driveby mode when the local player types driveby in the console.
function setDoingDriveby ( ) -- we check if local player isn't currently doing a gang driveby if not isPedDoingGangDriveby ( localPlayer ) then -- if he got driveby mode off, turn it on setPedWeaponSlot ( localPlayer, 4 ) setPedDoingGangDriveby ( localPlayer, true ) else -- otherwise, turn it off setPedWeaponSlot ( localPlayer, 0 ) setPedDoingGangDriveby ( localPlayer, false ) end end addCommandHandler ( "driveby", setDoingDriveby )
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