fix: requesting radar data when there's no driver

This commit is contained in:
Dan
2021-03-13 15:02:38 +00:00
parent 699bca2ee4
commit a65a5b4cbf

View File

@@ -89,7 +89,11 @@ function SYNC:SyncDataOnEnter()
if ( PLY:IsPassenger() ) then
-- UTIL:Notify( "Triggering server event to get radar data" )
local driver = PLY:GetOtherPedServerId()
-- Only trigger the event if there is actually a driver
if ( driver ~= nil ) then
TriggerServerEvent( "wk_wars2x_sync:requestRadarData", driver )
end
elseif ( PLY:IsDriver() ) then
-- UTIL:Notify( "Restoring local radar data" )