OnPlayerWeaponSwitch

From GTA Network Wiki
Jump to: navigation, search

OnPlayerWeaponSwitch
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

This event is triggered when a player changes weapon.

Attribute

[ServerEvent(Event.PlayerWeaponSwitch)]

Required Parameters

  • Client: the player.
  • WeaponHash: the hash of the old weapon.
  • WeaponHash: the hash of the new weapon.

Usage example(s)

[ServerEvent(Event.PlayerWeaponSwitch)]
public void OnPlayerWeaponSwitch(Client player, WeaponHash oldWeapon, WeaponHash newWeapon)
{
    // Some code
}

Changelog

Version Description
1.0 Release.

References