Scripting/Server/NPCs/npc.DriveTo

Puts the NPC in the driver's seat and lets the game's car AI drive to the point (steering, speed and route are native). The vehicle must be a network vehicle.

Syntax

npc.DriveTo(vehicle, Vector(x, y, z))

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "driveto" )
	{
		// npc is a npc handle (see NPC members)
		npc.DriveTo( veh, 0 );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: NPC members

Categories: Server functions | NPC members