GetPedWeaponMuzzlePosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
m (Added to the Needs Example category)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
{{Client function}}
{{Needs Example}}


Returns the world position of the muzzle of the weapon that a ped is currently carrying. The weapon muzzle is the end of the gun barrel where the bullets/rockets/... come out.
Returns the world position of the muzzle of the weapon that a ped is currently carrying. The weapon muzzle is the end of the gun barrel where the bullets/rockets/... come out.

Revision as of 13:50, 25 June 2014

Accessories-text-editor.png Script Example Missing Function GetPedWeaponMuzzlePosition needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


Returns the world position of the muzzle of the weapon that a ped is currently carrying. The weapon muzzle is the end of the gun barrel where the bullets/rockets/... come out.

The position may not be accurate if the ped is off screen.

Syntax

float, float, float getPedWeaponMuzzlePosition ( ped thePed )

Required Arguments

  • thePed: the ped whose weapon muzzle position to retrieve.

Returns

If successful, returns the x/y/z coordinates of the weapon muzzle. Returns false otherwise.

See Also