mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16: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
|
||||
----------------------------------------------------------------------------------]]--
|
||||
function SYNC:SyncData( cb )
|
||||
if ( PLY:CanControlRadar() ) then
|
||||
local otherPed = PLY:GetOtherPed()
|
||||
|
||||
if ( otherPed ~= nil and otherPed ~= 0 and IsPedAPlayer( otherPed ) ) then
|
||||
@@ -45,6 +46,7 @@ function SYNC:SyncData( cb )
|
||||
cb( otherPly )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function SYNC:SendPowerState( state )
|
||||
self:SyncData( function( ply )
|
||||
|
||||
Reference in New Issue
Block a user