HUD
Functions

Vehicle: set Horn Custom

This will force this vehicle to only use this custom horn from now on.

Used in: VCMod Main, VCMod ELS addons.

Server Entity Vehicle:VC_setHornCustom(String snd, Integer pitch, Integer vol, Integer lvl)

Arguments

1. String snd; Sound name
If nil, it will remove any custom sounds. This is local to "Sound" directory, so it should look something like this: "vcmod/horn/light.wav".

2. Integer pitch; Pitch (optional)
0-255, 100 is default

3. Integer vol; Volume (optional)
0-1, pretty self-explanatory, controls how loud it is.

4. Integer lvl; Level (optional)
0-100 this is essentially "how far it can be heard" option. Default is 85.

Example

concommand.Add("vehicle_changecarshorn", function()
	local ent = player.GetAll()[1]:GetEyeTraceNoCursor().Entity
	if IsValid(ent) then
		ent:VC_setHornCustom("vcmod/horn/general_lee.wav")
		print("This vehicle now has a general lee horn.")
	else
		print("Invalid entity.")
	end
end)
Page modified:
...2018-11-02 09:24:42