Scripting/Squirrel/Functions/SetWeaponDataValue: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function will edit the settings of a weapon. (damage, range, etc) == Syntax == <pre>SetWeaponDataValue( weaponID , fieldID, value )</pre> == Arguments == * ''integer'...")
 
mNo edit summary
Line 25: Line 25:
== Related Functions ==
== Related Functions ==


{{Scripting/Squirrel/Functions/SetWeaponDataValue}}
{{Scripting/Squirrel/Functions/Weapon Functions}}

Revision as of 11:18, 20 February 2015

This function will edit the settings of a weapon. (damage, range, etc)

Syntax

SetWeaponDataValue( weaponID , fieldID, value )

Arguments

  • integer weaponID - model ID of weapon
  • integer fieldID - field ID of data you want to edit ( WeaponDataValue )
  • float value - value to be set

Example

The following example edit the damage value of minigun to "0".

function onScriptLoad()
{
     SetWeaponDataValue( 33, 6, 0 );
}

Notes

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

Related Functions