Skip to content

Commit 04fb861

Browse files
authored
killmessages: fix duplicate killfeed entry (#342)
1 parent fe59ab1 commit 04fb861

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

[gameplay]/killmessages/scripts/client/c.killmessages.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ end)
134134

135135
addEventHandler('onClientPlayerWasted', localPlayer, function()
136136
if (not possibleKiller) then
137-
-- If there is no possible killer and the current vehicle is exploded
138137
local myVehicle = getPedOccupiedVehicle(localPlayer)
139-
myVehicle = myVehicle and isVehicleBlown(myVehicle)
140-
triggerServerEvent('outputKillFromClient', localPlayer, localPlayer, myVehicle)
138+
139+
if myVehicle and isVehicleBlown(myVehicle) then
140+
triggerServerEvent('outputKillFromClient', localPlayer, localPlayer, myVehicle)
141+
end
142+
141143
return
142144
end
143145

0 commit comments

Comments
 (0)