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
(Created page with "This function is used to kill/explode any specified Vehicle. == SYNTAX == Vehicle.Kill() == Example == function onPlayerCommand( player, cmd, text ) { else if ( cmd == "kill...")
 
Line 5: Line 5:


== Example ==
== Example ==
<source lang="squirrel">
function onPlayerCommand( player, cmd, text )
function onPlayerCommand( player, cmd, text )
{
{
Line 16: Line 17:
}
}
}
}
</source>


By Anik
By Anik

Revision as of 12:42, 9 March 2016

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

SYNTAX

Vehicle.Kill()

Example

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

By Anik