mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-02-13 09:42:53 +08:00
Fix baseevents' deathmanager to include a hash for the weapon the player was killed with
This commit is contained in:
parent
07ba1df6ca
commit
e5ca05f59e
@ -17,7 +17,7 @@ Citizen.CreateThread(function()
|
|||||||
diedAt = GetGameTimer()
|
diedAt = GetGameTimer()
|
||||||
end
|
end
|
||||||
|
|
||||||
local killer = NetworkGetEntityKillerOfPlayer(player)
|
local killer, killerweapon = NetworkGetEntityKillerOfPlayer(player)
|
||||||
local killerentitytype = GetEntityType(killer)
|
local killerentitytype = GetEntityType(killer)
|
||||||
local killertype = -1
|
local killertype = -1
|
||||||
local killerinvehicle = false
|
local killerinvehicle = false
|
||||||
@ -43,8 +43,8 @@ Citizen.CreateThread(function()
|
|||||||
TriggerServerEvent('baseevents:onPlayerDied', killertype, { table.unpack(GetEntityCoords(ped)) })
|
TriggerServerEvent('baseevents:onPlayerDied', killertype, { table.unpack(GetEntityCoords(ped)) })
|
||||||
hasBeenDead = true
|
hasBeenDead = true
|
||||||
else
|
else
|
||||||
TriggerEvent('baseevents:onPlayerKilled', killerid, {killertype=killertype, killerinveh=killerinvehicle, killervehseat=killervehicleseat, killervehname=killervehiclename, killerpos=table.unpack(GetEntityCoords(ped))})
|
TriggerEvent('baseevents:onPlayerKilled', killerid, {killertype=killertype, weaponhash = killerweapon, killerinveh=killerinvehicle, killervehseat=killervehicleseat, killervehname=killervehiclename, killerpos=table.unpack(GetEntityCoords(ped))})
|
||||||
TriggerServerEvent('baseevents:onPlayerKilled', killerid, {killertype=killertype, killerinveh=killerinvehicle, killervehseat=killervehicleseat, killervehname=killervehiclename, killerpos=table.unpack(GetEntityCoords(ped))})
|
TriggerServerEvent('baseevents:onPlayerKilled', killerid, {killertype=killertype, weaponhash = killerweapon, killerinveh=killerinvehicle, killervehseat=killervehicleseat, killervehname=killervehiclename, killerpos=table.unpack(GetEntityCoords(ped))})
|
||||||
hasBeenDead = true
|
hasBeenDead = true
|
||||||
end
|
end
|
||||||
elseif not IsPedFatallyInjured(ped) then
|
elseif not IsPedFatallyInjured(ped) then
|
||||||
|
Loading…
Reference in New Issue
Block a user