mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
feat: sync will only work if the player can control the system
This commit is contained in:
@@ -37,6 +37,7 @@ SYNC = {}
|
|||||||
Sync functions
|
Sync functions
|
||||||
----------------------------------------------------------------------------------]]--
|
----------------------------------------------------------------------------------]]--
|
||||||
function SYNC:SyncData( cb )
|
function SYNC:SyncData( cb )
|
||||||
|
if ( PLY:CanControlRadar() ) then
|
||||||
local otherPed = PLY:GetOtherPed()
|
local otherPed = PLY:GetOtherPed()
|
||||||
|
|
||||||
if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then
|
if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then
|
||||||
@@ -44,6 +45,7 @@ function SYNC:SyncData( cb )
|
|||||||
|
|
||||||
cb( otherPly )
|
cb( otherPly )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SYNC:SendPowerState( state )
|
function SYNC:SendPowerState( state )
|
||||||
|
|||||||
Reference in New Issue
Block a user