RepairVehicle

From GT-MP
Jump to: navigation, search
RepairVehicle
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

This function will repair the vehicle.

Syntax

API.repairVehicle(NetHandle vehicle);

Required Arguments

  • vehicle: parameter input should be in NetHandle type.

Usage example(s)

// This command repairs all vehicles on server.
[Command("repairvehicles")]
public void repairVehiclesCommand(Client player)
{
    List<NetHandle> vehicleList = API.getAllVehicles();
    foreach(NetHandle vehicle in vehicleList)
    {
        API.repairVehicle(vehicle);
    }
}

References

getAllVehicles