mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2026-09-21 02:39:29 +02:00
fix(baseevents): correct killer check
This commit is contained in:
@@ -34,7 +34,7 @@ Citizen.CreateThread(function()
|
||||
end
|
||||
|
||||
local killerid = NetworkGetPlayerIndexFromPed(killer)
|
||||
if killer ~= ped and killerid ~= nil and NetworkIsPlayerActive(killerid) then killerid = GetPlayerServerId(killerid)
|
||||
if killer ~= ped and killerid ~= -1 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
|
||||
|
||||
Reference in New Issue
Block a user