mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Passenger control for setting antenna mode
This commit is contained in:
@@ -1544,6 +1544,7 @@ end )
|
|||||||
|
|
||||||
-- Runs when the user presses any of the antenna mode buttons on the remote
|
-- Runs when the user presses any of the antenna mode buttons on the remote
|
||||||
RegisterNUICallback( "setAntennaMode", function( data, cb )
|
RegisterNUICallback( "setAntennaMode", function( data, cb )
|
||||||
|
if ( PLY:CanControlRadar() ) then
|
||||||
-- Only run the codw if the radar has power and is not powering up
|
-- Only run the codw if the radar has power and is not powering up
|
||||||
if ( RADAR:IsPowerOn() and not RADAR:IsPoweringUp() ) then
|
if ( RADAR:IsPowerOn() and not RADAR:IsPoweringUp() ) then
|
||||||
-- As the mode buttons are used to exit the menu, we check for that
|
-- 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
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
cb( "ok" )
|
cb( "ok" )
|
||||||
end )
|
end )
|
||||||
|
|||||||
Reference in New Issue
Block a user