MakePedUseGun: Difference between revisions
Jump to navigation
Jump to search
m (Deprecated) |
m (Changed "DeprecatedWithAlt" template to "Deprecated") |
||
(10 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{Deprecated}} | {{Deprecated|setPedControlState|}} | ||
This function is used to force a ped to use a gun. | This function is used to force a ped to use a gun. | ||
Line 26: | Line 27: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | --ToDo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client_ped_functions}} | {{Client_ped_functions}} | ||
Latest revision as of 16:36, 13 February 2015
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use setPedControlState instead. |
This function is used to force a ped to use a gun.
Syntax
bool makePedUseGun ( ped thePed, int useType, element target )
Required Arguments
- thePed: The ped you wish to force the use of a gun upon.
- useType: How the weapon should be used, will accept the following values:
- 0: Do nothing
- 1: Aim weapon
- 2: Fire
- 3: Burst-fire
- 4: Reload
- 5: Pistolwhip (Weapon melee)
- 6: Cancel use
- 7: Cancel use immediately
- target: An element referring to the target that the ped will use its weapon against.
Returns
Returns true if the command was successful, false otherwise.
Example
--ToDo
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