Scripting/Squirrel/Functions/Vehicle.Kill: 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
Line 1: Line 1:
This function is used to kill/explode any specified Vehicle.
This function is used to kill/explode any specified Vehicle.


== SYNTAX ==
== Syntax ==
Vehicle.Kill()
Vehicle.Kill()


Line 21: Line 21:
}
}
</source>
</source>
By Anik

Revision as of 16:01, 2 January 2017

This function is used to kill/explode any specified Vehicle.

Syntax

Vehicle.Kill()

Example

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "killcar" )
{
if ( !text ) MessagePlayer("Syntax: /" + cmd + " [Vehicle ID]", player );
else {
local veh = FindVehicle( text.tointeger() );
if ( !veh ) MessagePlayer("ERROR --> Invalid Vehicle/ID.", player );
else{
veh.Kill();
}
}
}
}