Scripting/Server/Events/onPlayerShoot

The player's weapon fired - on foot, in a vehicle, anywhere (gun ammo going down; thrown weapons too). shotVec is a Vector: the end point of the bullet line (impact point), or a point about 30 m ahead when the game did not cast a line. player.Weapon is the weapon. Rate limited to one event per 20 ms per player. On Android the point is always about 30 m ahead (no bullet-line cast).

Syntax

onPlayerShoot(player, shotVec)

Arguments

Example

function onPlayerShoot( player, shotVec )
{
	MessagePlayer( "onPlayerShoot 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