SetVehicleFuelLevel

From GT-MP
Jump to: navigation, search
SetVehicleFuelLevel
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

See also: GetVehicleFuelLevel

Sets the fuel level of the vehicle.

The fuel level is displayed at the dashboard.

0 = Vehicle doesn't Work(Can't drive)
1-3 = Vehicle Bug's backwards 
4-6 = Vehicle stutter
7+ = Vehicle works fine

Syntax

In C#
Server-Side Function

void API.setVehicleFuelLevel(NetHandle vehicle, float fuelLevel);

Required Arguments

  • vehicle: parameter input should be in NetHandle type.
  • fuelLevel: parameter input should be in float type.

In Javascript
Client-Side Function

void API.setVehicleFuelLevel(LocalHandle vehicle, float fuelLevel);

Required Arguments

  • vehicle: parameter input should be in LocalHandle type.
  • fuelLevel: parameter input should be in float type.

Usage example(s)

API.setVehicleFuelLevel(LocalHandle vehicle, float fuelLevel);


References