Scripting/Squirrel/Functions/Vehicle.Kill

From Vice City Multiplayer
Revision as of 12:48, 9 March 2016 by Anik (talk | contribs) (→‎Example)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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() );
veh.Kill();
}
}
}

By Anik