|  |  | @ -7,6 +7,7 @@ local dlstatus = require("moonloader").download_status | 
			
		
	
		
		
			
				
					
					|  |  |  | local vkeys = require "lib.vkeys" |  |  |  | local vkeys = require "lib.vkeys" | 
			
		
	
		
		
			
				
					
					|  |  |  | local ffi = require("ffi") |  |  |  | local ffi = require("ffi") | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | ffi.cdef [[ bool SetCursorPos(int X, int Y); ]] |  |  |  | ffi.cdef [[ bool SetCursorPos(int X, int Y); ]] | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | function try(f, catch_f) |  |  |  | function try(f, catch_f) | 
			
		
	
	
		
		
			
				
					|  |  | @ -2107,15 +2108,12 @@ function loadEvents() | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     function sampev.onVehicleSync(playerId, vehicleId, data) |  |  |  |     function sampev.onVehicleSync(playerId, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |        --lua_thread.create(luChecker.vehicleSync, playerId, vehicleId, data) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |        luChecker.vehicleSync(playerId, vehicleId, data) |  |  |  |        luChecker.vehicleSync(playerId, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     function sampev.onTrailerSync(playerId, data) |  |  |  |     function sampev.onTrailerSync(playerId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |         --lua_thread.create(luChecker.trailerSync, playerId, data) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.trailerSync(playerId, data) |  |  |  |         luChecker.trailerSync(playerId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     function sampev.onVehicleStreamOut(vehicleId) |  |  |  |     function sampev.onVehicleStreamOut(vehicleId) | 
			
		
	
		
		
			
				
					
					|  |  |  |         --lua_thread.create(luChecker.vehicleStream, false, vehicleId) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.vehicleStream(false, vehicleId) |  |  |  |         luChecker.vehicleStream(false, vehicleId) | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     function sampev.onSendChat(message) |  |  |  |     function sampev.onSendChat(message) | 
			
		
	
	
		
		
			
				
					|  |  | @ -2198,7 +2196,6 @@ function loadEvents() | 
			
		
	
		
		
			
				
					
					|  |  |  |         antiflood = os.clock() * 1000 |  |  |  |         antiflood = os.clock() * 1000 | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     function sampev.onVehicleStreamIn(vehicleId, data) |  |  |  |     function sampev.onVehicleStreamIn(vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |         --lua_thread.create(luChecker.vehicleStream, true, vehicleId, data) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.vehicleStream(true, vehicleId, data) |  |  |  |         luChecker.vehicleStream(true, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |         if inifiles ~= nil and not inifiles.Settings.Tuning and (data.type == 403 or data.type == 515) then |  |  |  |         if inifiles ~= nil and not inifiles.Settings.Tuning and (data.type == 403 or data.type == 515) then | 
			
		
	
		
		
			
				
					
					|  |  |  |             data.modSlots[8] = 0 |  |  |  |             data.modSlots[8] = 0 | 
			
		
	
	
		
		
			
				
					|  |  | @ -3406,6 +3403,7 @@ function transponder() | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | solo_antiflood_message = {} | 
			
		
	
		
		
			
				
					
					|  |  |  | function transponder_solo_message(info) |  |  |  | function transponder_solo_message(info) | 
			
		
	
		
		
			
				
					
					|  |  |  |     if info.solo_data ~= nil then |  |  |  |     if info.solo_data ~= nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |         for sender, solo_data in pairs(info.solo_data) do |  |  |  |         for sender, solo_data in pairs(info.solo_data) do | 
			
		
	
	
		
		
			
				
					|  |  | @ -3433,8 +3431,12 @@ function transponder_solo_message(info) | 
			
		
	
		
		
			
				
					
					|  |  |  |                         end |  |  |  |                         end | 
			
		
	
		
		
			
				
					
					|  |  |  |                         if not result_find then |  |  |  |                         if not result_find then | 
			
		
	
		
		
			
				
					
					|  |  |  |                             if texts_of_reports[solo_data["cargo"]] ~= nil then |  |  |  |                             if texts_of_reports[solo_data["cargo"]] ~= nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 local text = string.format("[TruckHUD]: %s[%s] %s %s. Îòïðàâèë: %s", solo_data.name, solo_data.id, (solo_data.action == "load" and "çàãðóçèëñÿ íà" or "ðàçãðóçèë"), texts_of_reports[solo_data["cargo"]], sender) |  |  |  |                                 local text1 = string.format("%s[%s] %s %s.", solo_data.name, solo_data.id, (solo_data.action == "load" and "çàãðóçèëñÿ íà" or "ðàçãðóçèë"), texts_of_reports[solo_data["cargo"]]) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                                 sampAddChatMessage(text,-1) |  |  |  |                                 local text = string.format("%s Îòïðàâèë: %s", text1, sender) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 if solo_antiflood_message[text1] == nil or (os.time() - solo_antiflood_message[text1] > 3) then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     solo_antiflood_message[text1] = os.time() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     addChatMessage(text) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 end | 
			
		
	
		
		
			
				
					
					|  |  |  |                             end |  |  |  |                             end | 
			
		
	
		
		
			
				
					
					|  |  |  |                         end |  |  |  |                         end | 
			
		
	
		
		
			
				
					
					|  |  |  |                         solo_data_antiflood[sender][#solo_data_antiflood[sender]+1] = solo_data |  |  |  |                         solo_data_antiflood[sender][#solo_data_antiflood[sender]+1] = solo_data | 
			
		
	
	
		
		
			
				
					|  |  | @ -3636,7 +3638,6 @@ function get_time() | 
			
		
	
		
		
			
				
					
					|  |  |  |         msk_timestamp = msk_timestamp + (os.time() - _time) |  |  |  |         msk_timestamp = msk_timestamp + (os.time() - _time) | 
			
		
	
		
		
			
				
					
					|  |  |  |         _time = os.time() |  |  |  |         _time = os.time() | 
			
		
	
		
		
			
				
					
					|  |  |  |         if inifiles.Settings.AutoClear then |  |  |  |         if inifiles.Settings.AutoClear then | 
			
		
	
		
		
			
				
					
					|  |  |  |             threads = {} |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             collectgarbage("step") |  |  |  |             collectgarbage("step") | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
	
		
		
			
				
					|  |  | @ -4058,7 +4059,8 @@ end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | function luChecker.vehicleStream(stream, vehicleId, data) |  |  |  | function luChecker.vehicleStream(stream, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |     if stream then |  |  |  |     if stream then | 
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.vehicles[vehicleId] = data |  |  |  |         luChecker.vehicles[vehicleId] = {} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         luChecker.vehicles[vehicleId]["type"] = data["type"] | 
			
		
	
		
		
			
				
					
					|  |  |  |     else |  |  |  |     else | 
			
		
	
		
		
			
				
					
					|  |  |  |         local result, playerId, isTrailer = isVehicleTruckersDelete(luChecker.truckers, vehicleId) |  |  |  |         local result, playerId, isTrailer = isVehicleTruckersDelete(luChecker.truckers, vehicleId) | 
			
		
	
		
		
			
				
					
					|  |  |  |         if result then |  |  |  |         if result then | 
			
		
	
	
		
		
			
				
					|  |  | @ -4081,7 +4083,8 @@ function luChecker.vehicleSync(playerId, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |         if luChecker.vehicles[vehicleId] ~= nil and (luChecker.vehicles[vehicleId].type == 403 or luChecker.vehicles[vehicleId].type == 514 or luChecker.vehicles[vehicleId].type == 515) then |  |  |  |         if luChecker.vehicles[vehicleId] ~= nil and (luChecker.vehicles[vehicleId].type == 403 or luChecker.vehicles[vehicleId].type == 514 or luChecker.vehicles[vehicleId].type == 515) then | 
			
		
	
		
		
			
				
					
					|  |  |  |             if luChecker.truckers[playerId] == nil then |  |  |  |             if luChecker.truckers[playerId] == nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId] = {} |  |  |  |                 luChecker.truckers[playerId] = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["data"] = data |  |  |  |                 luChecker.truckers[playerId]["data"] = {} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 luChecker.truckers[playerId]["data"]["position"] = data["position"] | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["vehicleId"] = vehicleId |  |  |  |                 luChecker.truckers[playerId]["vehicleId"] = vehicleId | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["vehicleDataTime"] = os.time() |  |  |  |                 luChecker.truckers[playerId]["vehicleDataTime"] = os.time() | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["trailerDataTime"] = 0 |  |  |  |                 luChecker.truckers[playerId]["trailerDataTime"] = 0 | 
			
		
	
	
		
		
			
				
					|  |  | @ -4089,7 +4092,8 @@ function luChecker.vehicleSync(playerId, vehicleId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     trailerId = -1 |  |  |  |                     trailerId = -1 | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             else |  |  |  |             else | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["data"] = data |  |  |  |                 luChecker.truckers[playerId]["data"] = {} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 luChecker.truckers[playerId]["data"]["position"] = data["position"] | 
			
		
	
		
		
			
				
					
					|  |  |  |                 luChecker.truckers[playerId]["vehicleId"] = vehicleId |  |  |  |                 luChecker.truckers[playerId]["vehicleId"] = vehicleId | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if os.time() - luChecker.truckers[playerId]["trailerDataTime"] > 5 and os.time() - luChecker.truckers[playerId]["vehicleDataTime"] < 5 and os.time() - live == 0 then |  |  |  |                 if os.time() - luChecker.truckers[playerId]["trailerDataTime"] > 5 and os.time() - luChecker.truckers[playerId]["vehicleDataTime"] < 5 and os.time() - live == 0 then | 
			
		
	
		
		
			
				
					
					|  |  |  |                     luChecker.truckers[playerId]["trailerData"]["trailerId"] = -1 |  |  |  |                     luChecker.truckers[playerId]["trailerData"]["trailerId"] = -1 | 
			
		
	
	
		
		
			
				
					|  |  | @ -4102,9 +4106,11 @@ end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | function luChecker.trailerSync(playerId, data) |  |  |  | function luChecker.trailerSync(playerId, data) | 
			
		
	
		
		
			
				
					
					|  |  |  |     if not isPlayerHaveTruckHUD(playerId) and luChecker.truckers[playerId] ~= nil then |  |  |  |     if not isPlayerHaveTruckHUD(playerId) and luChecker.truckers[playerId] ~= nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.truckers[playerId]["trailerDataTime"] = os.time() |  |  |  |         if luChecker.vehicles[data["trailerId"]] ~= nil then | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.checkerLoad(playerId, data, luChecker.truckers[playerId]["data"]["position"]) |  |  |  |             luChecker.truckers[playerId]["trailerDataTime"] = os.time() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         luChecker.truckers[playerId]["trailerData"] = data |  |  |  |             luChecker.checkerLoad(playerId, data, luChecker.truckers[playerId]["data"]["position"]) | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             luChecker.truckers[playerId]["trailerData"]["trailerId"] = data["trailerId"] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -4170,6 +4176,7 @@ function luChecker.checker() | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |             if getLocalPlayerId() ~= playerId then |  |  |  |             if getLocalPlayerId() ~= playerId then | 
			
		
	
		
		
			
				
					
					|  |  |  |                 local dist = getDistanceBetweenCoords3d(position_3dtext.x,position_3dtext.y,position_3dtext.z,position_trailer.x,position_trailer.y,position_trailer.z) |  |  |  |                 local dist = getDistanceBetweenCoords3d(position_3dtext.x,position_3dtext.y,position_3dtext.z,position_trailer.x,position_trailer.y,position_trailer.z) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 say("Äèñòàíöèÿ îò ðàçãðóçèâøåãîñÿ äî ïîðòà "..dist) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if dist < 50 then |  |  |  |                 if dist < 50 then | 
			
		
	
		
		
			
				
					
					|  |  |  |                     local key = getPort(position_trailer.x,position_trailer.y,position_trailer.z) |  |  |  |                     local key = getPort(position_trailer.x,position_trailer.y,position_trailer.z) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     key = key..cargo_replace[luChecker.price_set[1].key] |  |  |  |                     key = key..cargo_replace[luChecker.price_set[1].key] | 
			
		
	
	
		
		
			
				
					|  |  | 
 |