Scripting/Squirrel/Functions/SetWeaponDataValue: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
mNo edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 21: | Line 21: | ||
=== Notes === | === Notes === | ||
Call [[ | Call [[onScriptLoad]] were used in this example. More info about them in the corresponding pages. | ||
== Related Functions == | == Related Functions == | ||
{{Scripting/Squirrel/Functions/Weapon Functions}} | {{Scripting/Squirrel/Functions/Weapon Functions}} | ||
[[Category:Scripting/Squirrel/Functions/Weapon_Functions]] |
Latest revision as of 22:06, 30 January 2017
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 onScriptLoad were used in this example. More info about them in the corresponding pages.