MakePedUseGun: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Client function}} This function is used to force a ped to use a gun. ==Syntax== <syntaxhighlight lang="lua"> bool makePedUseGun ( ped thePed, int useType, element target ) </syntaxhighlight> ===Required...)
 
mNo edit summary
Line 31: Line 31:


==See Also==
==See Also==
{{Ped_functions}}
{{Client_ped_functions}}
[[Category:Needs_Example]]
[[Category:Needs_Example]]

Revision as of 00:08, 21 June 2008

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

This page lacks an example

--add an example here

See Also