mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
fix: requesting radar data when there's no driver
This commit is contained in:
@@ -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" )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user