diff --git a/resources/[system]/baseevents/deathevents.lua b/resources/[system]/baseevents/deathevents.lua index e8189de0b..2237e8693 100644 --- a/resources/[system]/baseevents/deathevents.lua +++ b/resources/[system]/baseevents/deathevents.lua @@ -33,7 +33,7 @@ Citizen.CreateThread(function() end end - local killerid = GetPlayerByEntityID(killer) + local killerid = NetworkGetPlayerIndexFromPed(killer) if killer ~= ped and killerid ~= nil and NetworkIsPlayerActive(killerid) then killerid = GetPlayerServerId(killerid) else killerid = -1 end @@ -64,10 +64,3 @@ Citizen.CreateThread(function() end end end) - -function GetPlayerByEntityID(id) - for i=0,32 do - if(NetworkIsPlayerActive(i) and GetPlayerPed(i) == id) then return i end - end - return nil -end diff --git a/resources/[system]/baseevents/__resource.lua b/resources/[system]/baseevents/fxmanifest.lua similarity index 93% rename from resources/[system]/baseevents/__resource.lua rename to resources/[system]/baseevents/fxmanifest.lua index f3caa36e5..253d9843b 100644 --- a/resources/[system]/baseevents/__resource.lua +++ b/resources/[system]/baseevents/fxmanifest.lua @@ -1,6 +1,9 @@ -- This resource is part of the default Cfx.re asset pack (cfx-server-data) -- Altering or recreating for local use only is strongly discouraged. +fx_version 'cerulean' +game 'gta5' + version '1.0.0' author 'Cfx.re ' description 'Adds basic events for developers to use in their scripts. Some third party resources may depend on this resource.'