HUD
Functions

GM: sound Emit ELS

Called before ELS sound is played. Can be used to override any ELS related sound for specific vehicle(s).

Used in: VCMod ELS addon.

Client GM:VC_soundEmit_ELS(Entity ent, String type, Table data)

Arguments

1. Entity ent; Vehicle
The unlucky vehicle.

2. String type; Type
The type of sound, available types: bullhorn, siren, siren_manual.

3. Table data; Sound data table
Can include a lot of information, but "Sound", "Distance", "Pitch" and "Volume" will always be there. Other data in this table is for reference only, changing it will not affect anything.

Returns

1. Boolean/Table If returned false no sound will be played, if returned the data folder it will override any of the data in the "data" argument.

Example

hook.Add("VC_soundEmit_ELS", "VC_soundELSChange", function(ent, type, data)
	// data tables output exammple (PrintTable(data)):
-- Distance	=	95
-- Name	=	Priority
-- Pitch	=	100
-- Sound	=	vcmod/els/smartsiren/priority.wav
-- Volume	=	1


	// Replace all "Yelp" sirens with "Wail"
	if data.Name and data.Name == "Yelp" then
		data.Sound = "vcmod/els/smartsiren/wail.wav"
		return data // Lets return the changed data
	end

	// Disable siren "yelp" sound for all vehicles
	-- if data.Name and data.Name == "Yelp" then
		-- return false
	-- end
end)
Page modified:
...2018-12-09 20:02:47