startVehicleHorn
START_VEHICLE_HORN0x9C8C6504B5B63D2CThe GTA V native START_VEHICLE_HORN of the VEHICLE namespace, as LS:MP client scripts call it: the global function startVehicleHorn, in JavaScript and in Lua.
startVehicleHorn(
vehicle: Vehicle,
duration: number,
mode: Hash,
forever: boolean
): voidstartVehicleHorn(
vehicle: Vehicle,
duration: integer,
mode: Hash,
forever: boolean
)Usage
JavaScript
startVehicleHorn(vehicle, duration, mode, forever);Lua
startVehicleHorn(vehicle, duration, mode, forever)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
vehicle | Vehicle | number | integer | The vehicle to activate the horn for. |
duration | int | number | integer | The duration to sound the horn, in milliseconds. |
mode | Hash | number | integer | The hash of "NORMAL" or "HELDDOWN". Can be 0. |
forever | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Sounds the horn for the specified vehicle.
Note: If a player is in the vehicle, it will only sound briefly.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void START_VEHICLE_HORN(Vehicle vehicle, int duration, Hash mode, BOOL forever)- Hash
0x9C8C6504B5B63D2C