BreakVehicleHeadlight

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

Breaks/fixes the specified vehicle's specified headlight.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

Syntax

In C#
Server-Side Function

API.breakVehicleHeadlight(NetHandle vehicle, int headlight, bool breakHeadlight);

Required Arguments

  • vehicle parameter input should be in NetHandle type.
  • headlight parameter input should be in int type.
    • 0 - Left Headlight
    • 1 - Right Headlight
  • breakHeadlight parameter input should be in bool type.
    • false will fix the specified headlight.
    • true will break the specified headlight.

In Javascript
Client-Side Function

API.breakVehicleHeadlight(LocalHandle vehicle, int headlight, bool breakHeadlight);

Required Arguments

  • vehicle parameter input should be in LocalHandle type.
  • headlight parameter input should be in int type.
    • 0 - Left Headlight
    • 1 - Right Headlight
  • breakHeadlight parameter input should be in bool type.
    • false will fix the specified headlight.
    • true will break the specified headlight.

Usage example

In C#
Server-Side Function

API.breakVehicleHeadlight(NetHandle vehicle, int headlight, bool breakHeadlight);

In Javascript
Client-Side Function

API.breakVehicleHeadlight(LocalHandle vehicle, int headlight, bool breakHeadlight);

References