mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16: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
|
||||
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 )
|
||||
|
||||
Reference in New Issue
Block a user