VehicleClient

startVehicleHorn

START_VEHICLE_HORN0x9C8C6504B5B63D2C

The 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.

SignatureJavaScript
startVehicleHorn(
  vehicle: Vehicle,
  duration: number,
  mode: Hash,
  forever: boolean
): void
SignatureLua
startVehicleHorn(
  vehicle: Vehicle,
  duration: integer,
  mode: Hash,
  forever: boolean
)

Usage

JavaScript
startVehicleHorn(vehicle, duration, mode, forever);
Lua
startVehicleHorn(vehicle, duration, mode, forever)

Parameters

ParameterTypeJavaScriptLuaDescription
vehicleVehiclenumberintegerThe vehicle to activate the horn for.
durationintnumberintegerThe duration to sound the horn, in milliseconds.
modeHashnumberintegerThe hash of "NORMAL" or "HELDDOWN". Can be 0.
foreverBOOLbooleanboolean

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

Open in the interactive natives reference