mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
refactor: SyncData() to use GetOtherPedServerId()
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user