diff --git a/cl_sync.lua b/cl_sync.lua index 81a4951..800d61f 100644 --- a/cl_sync.lua +++ b/cl_sync.lua @@ -44,11 +44,9 @@ SYNC = {} -- player's server ID is passed to the given callback as an argument. function SYNC:SyncData( cb ) if ( PLY:CanControlRadar() ) then - local otherPed = PLY:GetOtherPed() - - if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then - local otherPly = GetPlayerServerId( NetworkGetPlayerIndexFromPed( otherPed ) ) + local otherPly = PLY:GetOtherPedServerId() + if ( otherPly ~= nil ) then cb( otherPly ) end end