mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Passenger control for operator menu
This commit is contained in:
@@ -1607,6 +1607,7 @@ end )
|
|||||||
|
|
||||||
-- Runs when the user presses the menu button on the remote control
|
-- Runs when the user presses the menu button on the remote control
|
||||||
RegisterNUICallback( "menu", function( data, cb )
|
RegisterNUICallback( "menu", 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 menu button is a multipurpose button, we first check to see if the menu is already open
|
-- As the menu button is a multipurpose button, we first check to see if the menu is already open
|
||||||
@@ -1624,6 +1625,7 @@ RegisterNUICallback( "menu", function( data, cb )
|
|||||||
-- Play the standard audio beep
|
-- Play the standard audio beep
|
||||||
SendNUIMessage( { _type = "audio", name = "beep", vol = RADAR:GetSettingValue( "beep" ) } )
|
SendNUIMessage( { _type = "audio", name = "beep", vol = RADAR:GetSettingValue( "beep" ) } )
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
cb( "ok" )
|
cb( "ok" )
|
||||||
end )
|
end )
|
||||||
|
|||||||
Reference in New Issue
Block a user