feat: sync will only work if the player can control the system

This commit is contained in:
Dan
2021-03-02 21:00:39 +00:00
parent 4231b71ea4
commit c2ea0dbfe7

View File

@@ -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 )