feat: only restore from backups if there are any

This commit is contained in:
Dan
2021-03-12 11:04:27 +00:00
parent 5e26858024
commit 2f9c483d6d

View File

@@ -92,10 +92,13 @@ function SYNC:SyncDataOnEnter()
TriggerServerEvent( "wk_wars2x_sync:requestRadarData", driver ) TriggerServerEvent( "wk_wars2x_sync:requestRadarData", driver )
elseif ( PLY:IsDriver() ) then elseif ( PLY:IsDriver() ) then
UTIL:Notify( "Restoring local radar data" ) UTIL:Notify( "Restoring local radar data" )
if ( RADAR:IsThereBackupData() ) then
-- Restore the local data -- Restore the local data
RADAR:RestoreFromBackup() RADAR:RestoreFromBackup()
end end
end end
end
end end