mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Passenger control for antenna toggle
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user