Scripting/Client/Events/onObjectShot

(0.6) A bullet of the local player hit a building, a map object or an object: the game's own map, the server's IPL maps and CreateObject objects (not vehicles and peds). model is the model id, x, y, z the position of the whole object (not the hit point) and rx, ry, rz its rotation in degrees, in the same order as CreateObject / object.Rotation use, so the values can be pasted into a script. One shot gives one call (a shotgun blast too); sniper bullets count. A function with fewer parameters gets fewer arguments: function onObjectShot(model) works. PC, Android and PS3.

Syntax

onObjectShot(model, x, y, z, rx, ry, rz)

Arguments

Example

function onObjectShot( model, x, y, z, rx, ry, rz )
{
	Message( "onObjectShot fired" );
}

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

Section: Client events

Categories: Client events | Client events