Passenger control for antenna toggle

This commit is contained in:
Dan
2020-11-29 15:24:45 +00:00
parent 3d9658d2d5
commit 8ced0c1fd1

View File

@@ -1579,6 +1579,7 @@ end )
-- Runs when the user presses either of the XMIT/HOLD buttons on the remote
RegisterNUICallback( "toggleAntenna", 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 xmit/hold buttons are used to change settings in the menu, we check for that
@@ -1599,6 +1600,7 @@ RegisterNUICallback( "toggleAntenna", function( data, cb )
end )
end
end
end
cb( "ok" )
end )