feat: make sync system check if the other ped is a player

This commit is contained in:
Dan
2021-03-02 19:16:13 +00:00
parent 044b5fa412
commit bf4a2efd7b

View File

@@ -39,7 +39,7 @@ SYNC = {}
function SYNC:SyncData( cb )
local otherPed = PLY:GetOtherPed()
if ( otherPed ~= nil and otherPed ~= 0 ) then
if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then
local otherPly = GetPlayerServerId( NetworkGetPlayerIndexFromPed( otherPed ) )
cb( otherPly )