OnObjectShot: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
This event is called when a player shoots an object.
This event is called when a player shoots an object.
==Syntax==
==Syntax==
onObjectShot(object,player,weapon )
<source lang=squirrel>
onObjectShot(object,player,weapon);
</source>
==Example==
==Example==
<pre>function onObjectShot(object,player,weapon ) {
<source lang=squirrel>
   MessagePlayer("You've shot object id "+object+" with weapon id "+weapon,player)
function onObjectShot(object, player, weapon) {
}</pre>
   MessagePlayer("You've shot object id " + object + " with weapon id " + weapon, player);
}
</source>
== Related Functions ==
 
{{Scripting/Squirrel/Events/Object_Events}}
[[Category:Scripting/Squirrel/Events/Object_Events]]

Latest revision as of 13:34, 7 May 2019

Description

This event is called when a player shoots an object.

Syntax

onObjectShot(object,player,weapon);

Example

function onObjectShot(object, player, weapon) {
   MessagePlayer("You've shot object id " + object + " with weapon id " + weapon, player);
}

Related Functions