Added /rre command, notifications, debug only commands

This commit is contained in:
Dan
2020-11-30 10:29:02 +00:00
parent 157729b5ec
commit 70f781b20e

View File

@@ -1,11 +1,22 @@
-- Radar Toggle Passenger Control if ( CONFIG.debug ) then
RegisterCommand( "rtpc", function( source, args, rawCommand ) -- Restart the resource
CONFIG.allow_passenger_control = not CONFIG.allow_passenger_control RegisterCommand( "rre", function( source, args, rawCommand )
end, false ) UTIL:Notify( "[DEBUG]: Restarting resource" )
TriggerEvent( "chat:addSuggestion", "/rtpc", "Toggle CONFIG.allow_passenger_control" ) ExecuteCommand( "restart wk_wars2x" )
end, false )
TriggerEvent( "chat:addSuggestion", "/rre", "Restarts wk_wars2x" )
-- Radar Toggle Passenger View -- Radar Toggle Passenger Control
RegisterCommand( "rtpv", function( source, args, rawCommand ) RegisterCommand( "rtpc", function( source, args, rawCommand )
CONFIG.allow_passenger_view = not CONFIG.allow_passenger_view CONFIG.allow_passenger_control = not CONFIG.allow_passenger_control
end, false ) UTIL:Notify( string.format( "[DEBUG]: CONFIG.allow_passenger_control set to %s", tostring( CONFIG.allow_passenger_control ) ) )
TriggerEvent( "chat:addSuggestion", "/rtpv", "Toggle CONFIG.allow_passenger_view" ) end, false )
TriggerEvent( "chat:addSuggestion", "/rtpc", "Toggle CONFIG.allow_passenger_control" )
-- Radar Toggle Passenger View
RegisterCommand( "rtpv", function( source, args, rawCommand )
CONFIG.allow_passenger_view = not CONFIG.allow_passenger_view
UTIL:Notify( string.format( "[DEBUG]: CONFIG.allow_passenger_view set to %s", tostring( CONFIG.allow_passenger_view ) ) )
end, false )
TriggerEvent( "chat:addSuggestion", "/rtpv", "Toggle CONFIG.allow_passenger_view" )
end