natives.setTaxiLights: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Created page with "{{ScriptItem |endpoint = client |type = function |name = natives.setTaxiLights |parameters = vehicle Vehicle, bool Enabled |parameter1 = bool enabled The vehicle |parameter2 = bool enabled Whether the taxi light should be on or off |usage = turn the taxi light on/off for a vehicle |notes = Use natives.areTaxiLightsOn to get whether the taxi light is currently on |return1 = void |returnFail1 = void |exampleJS = addCommandHandler("taxilight", fu...")
(No difference)

Revision as of 19:31, 12 November 2025

Function Client Only icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Client 1.0.0

void natives.setTaxiLights(vehicle Vehicle, bool Enabled)

The natives.setTaxiLights function is used to turn the taxi light on/off for a vehicle.

Parameters

1) bool enabled The vehicle.
2) bool enabled Whether the taxi light should be on or off.

Return

void This function doesn't return a value.

Notes

Examples

Example 1 - JavaScript:

addCommandHandler("taxilight", function(command, params, client) {

   natives.setTaxiLights(localPlayer.vehicle, !natives.areTaxiLightsOn(localPlayer.vehicle));

});

Compatibility

There isn't any compatibility information for this function.