Scripting/Squirrel/Functions/GetWeaponDataValue

From Vice City Multiplayer
Revision as of 11:31, 20 February 2015 by Sseebbyy (talk | contribs) (Created page with "This function will return a data value of a weapon. (damage, range, etc) == Syntax == <pre>GetWeaponDataValue( weaponID , fieldID )</pre> == Arguments == * ''integer'' '''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will return a data value of a weapon. (damage, range, etc)

Syntax

GetWeaponDataValue( weaponID , fieldID )

Arguments

  • integer weaponID - model ID of weapon
  • integer fieldID - field ID of data you want to get ( WeaponDataValue )

Example

The following example will change stubby shotgun's range to minigun's one.

function onScriptLoad()
{
     SetWeaponDataValue( 21, 2, GetWeaponDataValue( 21, 2 ) );
}

Notes

Call onScriptLoad were used in this example. More info about them in the corresponding pages.

Related Functions