Skip to content

Commit 7e710d0

Browse files
authored
Merge pull request #40 from matsn0w/matsn0w/issue35
fix: check if horn exists
2 parents 403d4bf + fb0b679 commit 7e710d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resource/client/main.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ local function HandleHorn(vehicle)
3838
local mainHorn = kjxmlData[GetCarHash(vehicle)].sounds.mainHorn
3939

4040
-- the custom horn is disabled
41-
if not mainHorn.allowUse then return end
41+
if not mainHorn or not mainHorn.allowUse then return end
4242

4343
-- disable default honk sound (INPUT_VEH_HORN)
4444
DisableControlAction(0, 86, true)

0 commit comments

Comments
 (0)