Passenger control for setting antenna mode

This commit is contained in:
Dan
2020-11-29 15:21:29 +00:00
parent fb13e79e3b
commit 3d9658d2d5

View File

@@ -1544,6 +1544,7 @@ end )
-- Runs when the user presses any of the antenna mode buttons on the remote
RegisterNUICallback( "setAntennaMode", function( data, cb )
if ( PLY:CanControlRadar() ) then
-- Only run the codw if the radar has power and is not powering up
if ( RADAR:IsPowerOn() and not RADAR:IsPoweringUp() ) then
-- As the mode buttons are used to exit the menu, we check for that
@@ -1571,6 +1572,7 @@ RegisterNUICallback( "setAntennaMode", function( data, cb )
end )
end
end
end
cb( "ok" )
end )