Scripting/Squirrel/Functions/GetWeaponDataValue

From Vice City Multiplayer [MIRROR]
Jump to: navigation, search

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

Syntax

GetWeaponDataValue( weaponID , fieldID )

Arguments

  • int weaponID - model ID of weapon
  • int fieldID - field ID of data you want to get

Example

The following example will change stubby shotgun's range to minigun's one. <source lang=squirrel> function onScriptLoad() {

    SetWeaponDataValue( 21, 2, GetWeaponDataValue( 33, 2 ) );

} </source>

Notes

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

Related Functions