CreateWeapon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:


===Required Arguments===
===Required Arguments===
* '''theType:''' The weapon type such as M4.
* '''theType:''' The weapon type such as M4. '''Note:''' All weapons does not work.
* '''x:''' The x position to create the weapon.
* '''x:''' The x position to create the weapon.
* '''y:''' The y position to create the weapon.
* '''y:''' The y position to create the weapon.

Revision as of 02:55, 3 September 2012

Creates a custom weapon that can fire bullets not related to player held weapons.

Syntax

weapon createWeapon ( string theType, float x, float y, float z )

Required Arguments

  • theType: The weapon type such as M4. Note: All weapons does not work.
  • x: The x position to create the weapon.
  • y: The y position to create the weapon.
  • z: The z position to create the weapon.

Returns

Returns a custom weapon element type and creates a simulated weapon at that position.

Requirements

Minimum server version 1.3.0-4555
Minimum client version 1.3.0-4555

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.0-4555" client="1.3.0-4555" />

See Also