AudioClient

startAlarm

START_ALARM0x0355EF116C4C97B2

The GTA V native START_ALARM of the AUDIO namespace, as LS:MP client scripts call it: the global function startAlarm, in JavaScript and in Lua.

SignatureJavaScript
startAlarm(alarmName: string, p2: boolean): void
SignatureLua
startAlarm(alarmName: string, p2: boolean)

Usage

JavaScript
startAlarm(alarmName, p2);
Lua
startAlarm(alarmName, p2)

Parameters

ParameterTypeJavaScriptLua
alarmNamestringstringstring
p2BOOLbooleanboolean

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.

Example:

This will start the alarm at Fort Zancudo.

startAlarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1);

First parameter (char) is the name of the alarm.
Second parameter (bool) is unknown, it does not seem to make a difference if this one is 0 or 1.


It DOES make a difference but it has to do with the duration or something I dunno yet


Found in the b617d scripts:

startAlarm("AGENCY_HEIST_FIB_TOWER_ALARMS", 0);
startAlarm("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER", 1);
startAlarm("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER_B", 0);
startAlarm("BIG_SCORE_HEIST_VAULT_ALARMS", a_0);
startAlarm("FBI_01_MORGUE_ALARMS", 1);
startAlarm("FIB_05_BIOTECH_LAB_ALARMS", 0);
startAlarm("JEWEL_STORE_HEIST_ALARMS", 0);
startAlarm("PALETO_BAY_SCORE_ALARM", 1);
startAlarm("PALETO_BAY_SCORE_CHICKEN_FACTORY_ALARM", 0);
startAlarm("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1);
startAlarm("PORT_OF_LS_HEIST_SHIP_ALARMS", 0);
startAlarm("PRISON_ALARMS", 0);
startAlarm("PROLOGUE_VAULT_ALARMS", 0);

Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json

Reference

Namespace
Audio AUDIO
In the game
void START_ALARM(const char* alarmName, BOOL p2)
Hash
0x0355EF116C4C97B2

Open in the interactive natives reference