natives.setTaxiLights: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
|type = function | |type = function | ||
|name = natives.setTaxiLights | |name = natives.setTaxiLights | ||
|parameters = vehicle | |parameters = Vehicle vehicle, bool enabled | ||
|parameter1 = vehicle | |parameter1 = Vehicle vehicle The vehicle | ||
|parameter2 = bool enabled Whether the taxi light should be on or off | |parameter2 = bool enabled Whether the taxi light should be on or off | ||
|usage = turn the taxi light on/off for a vehicle | |usage = turn the taxi light on/off for a vehicle | ||
Revision as of 19:34, 12 November 2025
Function Client Only
![]()
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) | Vehicle | vehicle | The vehicle. |
| 2) | bool | enabled | Whether the taxi light should be on or off. |
Return
| void | This function doesn't return a value. |
Notes
- Use natives.areTaxiLightsOn to get whether the taxi light is currently on.
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.