Scripting/Server/Events/onPlayerWeaponChange

The weapon in the player's hands changed. ammo is the ammo of the new weapon.

Syntax

onPlayerWeaponChange(player, oldWeapon, newWeapon, ammo)

Arguments

Example

function onPlayerWeaponChange( player, oldWeapon, newWeapon, ammo )
{
	MessagePlayer( "onPlayerWeaponChange fired", player );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Spawning, deaths and combat

Categories: Server events | Spawning, deaths and combat