mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26: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
|
if ( PLY:IsPassenger() ) then
|
||||||
-- UTIL:Notify( "Triggering server event to get radar data" )
|
-- UTIL:Notify( "Triggering server event to get radar data" )
|
||||||
local driver = PLY:GetOtherPedServerId()
|
local driver = PLY:GetOtherPedServerId()
|
||||||
|
|
||||||
|
-- Only trigger the event if there is actually a driver
|
||||||
|
if ( driver ~= nil ) then
|
||||||
TriggerServerEvent( "wk_wars2x_sync:requestRadarData", driver )
|
TriggerServerEvent( "wk_wars2x_sync:requestRadarData", driver )
|
||||||
|
end
|
||||||
elseif ( PLY:IsDriver() ) then
|
elseif ( PLY:IsDriver() ) then
|
||||||
-- UTIL:Notify( "Restoring local radar data" )
|
-- UTIL:Notify( "Restoring local radar data" )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user