|  |  | @ -9,7 +9,6 @@ encoding            = require "encoding" | 
			
		
	
		
		
			
				
					
					|  |  |  | encoding.default    = "CP1251" |  |  |  | encoding.default    = "CP1251" | 
			
		
	
		
		
			
				
					
					|  |  |  | u8                  = encoding.UTF8 |  |  |  | u8                  = encoding.UTF8 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | main_key_start =        { "VK_LSHIFT" } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | additional_key_start =  { "VK_W", "VK_S" } |  |  |  | additional_key_start =  { "VK_W", "VK_S" } | 
			
		
	
		
		
			
				
					
					|  |  |  | cruise =                false |  |  |  | cruise =                false | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -20,29 +19,33 @@ function main() | 
			
		
	
		
		
			
				
					
					|  |  |  |     lua_thread.create(menu.loop) |  |  |  |     lua_thread.create(menu.loop) | 
			
		
	
		
		
			
				
					
					|  |  |  |     while true do |  |  |  |     while true do | 
			
		
	
		
		
			
				
					
					|  |  |  |         wait(0) |  |  |  |         wait(0) | 
			
		
	
		
		
			
				
					
					|  |  |  |         local car = storeCarCharIsInNoSave(playerPed) |  |  |  |         doCruise() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if not isCharInAnyCar(playerPed) or not isCarEngineOn(car) then |  |  |  |     end | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             if cruise then |  |  |  | end | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 cruise = false |  |  |  | 
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 printStringNow('~R~cruise control - OFF', 1500) |  |  |  | function doCruise() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             end |  |  |  |     local car = storeCarCharIsInNoSave(playerPed) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             return |  |  |  |     if not isCharInAnyCar(playerPed) or not isCarEngineOn(car) then | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         if not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive() then |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             if not cruise and select(1, check_press_key(additional_key_start)) and select(1, check_press_key(main_key_start)) then |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 cruise = true |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 printStringNow('~G~cruise control - ON', 1500) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 repeat |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     wait(100) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 until not isKeyDown(vkeys["VK_W"]) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             elseif cruise and not isKeyDown(vkeys["VK_LSHIFT"]) and select(1, check_press_key(additional_key_start)) then |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 cruise = false |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 printStringNow('~R~cruise control - OFF', 1500) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             end |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         if cruise then |  |  |  |         if cruise then | 
			
		
	
		
		
			
				
					
					|  |  |  |             setGameKeyState(16, 255) |  |  |  |             cruise = false | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             printStringNow('~R~cruise control', 1500) | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsCursorActive() then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if not cruise and select(1, check_press_key(additional_key_start)) and isKeyDown(vkeys[config.data.key]) then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             cruise = true | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             printStringNow('~G~cruise control', 1500) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             repeat | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 wait(100) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             until not isKeyDown(vkeys["VK_W"]) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         elseif cruise and not isKeyDown(vkeys["VK_LSHIFT"]) and select(1, check_press_key(additional_key_start)) then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             cruise = false | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             printStringNow('~R~cruise control', 1500) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if cruise then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         setGameKeyState(16, 255) | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -67,7 +70,7 @@ menu.ffixcar_log = {} | 
			
		
	
		
		
			
				
					
					|  |  |  | menu.update = function() |  |  |  | menu.update = function() | 
			
		
	
		
		
			
				
					
					|  |  |  |     menu.dialog = { |  |  |  |     menu.dialog = { | 
			
		
	
		
		
			
				
					
					|  |  |  | 		["main"] = { |  |  |  | 		["main"] = { | 
			
		
	
		
		
			
				
					
					|  |  |  | 			settings = {title = "mafia-tools" ,style = 4 ,btn1 = "Выбрать" ,btn2 = "Закрыть" ,forward =  "{ffffff}" ,backwards = "\n" ,score = false}, |  |  |  | 			settings = {title = "easy-cruise" ,style = 4 ,btn1 = "Выбрать" ,btn2 = "Закрыть" ,forward =  "{ffffff}" ,backwards = "\n" ,score = false}, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 			{ |  |  |  | 			{ | 
			
		
	
		
		
			
				
					
					|  |  |  |                 { |  |  |  |                 { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     title = "Cruise\t"..(config.data.status and "вкл" or "выкл"), |  |  |  |                     title = "Cruise\t"..(config.data.status and "вкл" or "выкл"), | 
			
		
	
	
		
		
			
				
					|  |  | @ -87,7 +90,7 @@ menu.update = function() | 
			
		
	
		
		
			
				
					
					|  |  |  |                         repeat |  |  |  |                         repeat | 
			
		
	
		
		
			
				
					
					|  |  |  |                             wait(0) |  |  |  |                             wait(0) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             if not sampIsDialogActive() then |  |  |  |                             if not sampIsDialogActive() then | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 sampShowDialog(222,"LUA Truck-HUD: Смена активации","Нажмите на любую клавишу","Выбрать","Закрыть",0) |  |  |  |                                 sampShowDialog(222,"Смена активации","Нажмите на любую клавишу","Выбрать","Закрыть",0) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                             end |  |  |  |                             end | 
			
		
	
		
		
			
				
					
					|  |  |  |                             for k, v in pairs(vkeys) do |  |  |  |                             for k, v in pairs(vkeys) do | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 if wasKeyPressed(v) and k ~= "VK_ESCAPE" and k ~= "VK_RETURN" then |  |  |  |                                 if wasKeyPressed(v) and k ~= "VK_ESCAPE" and k ~= "VK_RETURN" then | 
			
		
	
	
		
		
			
				
					|  |  | 
 |