SetPlayerWeaponStat: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 41: Line 41:
|-
|-
|SpreadMovementModifier
|SpreadMovementModifier
|-1.0-1.0
|''-''1.0-1.0
|-
|-
|SpreadCrouchingModifier
|SpreadCrouchingModifier
|-1.0-1.0
|''-''1.0-1.0
|-
|-
|RateOfFire
|RateOfFire

Revision as of 16:22, 7 January 2020

SetPlayerWeaponStat

Type: Function
Context: Server
Introduced: v1.0

Description

Modifies a weapon stat per player.

Syntax

SetPlayerWeaponStat(player, weaponid, stat, value)

Parameters

  • player
    The player identifier.
  • weaponid
    The weapon model identifier.
  • stat
    The stat name.
  • value
    New stat value

Return Value

  • Returns true on success.
Weapon stats
Stat name Values
Range 1.0-50000.0
Recoil 0.0-2.0
CameraShake 0.0-5.0
CameraShakeCrouching 0.0-5.0
SpreadMin 0.0-1.0
SpreadMax 0.0-5.0
CameraShake 0.0-5.0
SpreadMovementModifier -1.0-1.0
SpreadCrouchingModifier -1.0-1.0
RateOfFire 1.0-1000.0
MagazineSize 0.0-100.0


Example

__EDIT_ME__

See also

__EDIT_ME__