Scripting/Squirrel/Functions/Vehicles/KillEngine

From VC-MP Wiki

Jump to: navigation, search

This function kills the engine of the given vehicle.

Syntax

bool vehicle.KillEngine()

Arguments

  • none

Example

This command turn off car engine

function onPlayerCommand( player, cmd, text )
{
     if ( cmd == "killengine" )
     {
         local veh = FindVehicle( text.tointeger() );
         if ( !veh ) PrivMessage( "Error: Wrong ID of the vehicle.", player );
         else {
             Message( "( " + GetVehicleNameFromModel( veh.Model ) + " ) Engine Turned (off)");
             veh.KillEngine();
         }
     }
}

Notes

-- TODO

Related Functions

Personal tools
squirrel scripting