|
|
|
@ -232,7 +232,6 @@ function main() |
|
|
|
|
doPair() |
|
|
|
|
doPickup() |
|
|
|
|
doPtt() |
|
|
|
|
trailer_fix_afk() |
|
|
|
|
if script_run then |
|
|
|
|
doCruise() |
|
|
|
|
if not sampIsScoreboardOpen() and sampIsChatVisible() and not isKeyDown(116) and not isKeyDown(121) and fastmapshow == nil then |
|
|
|
@ -2087,30 +2086,17 @@ end |
|
|
|
|
|
|
|
|
|
function loadEvents() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
time_send_trailer_sync = 0 |
|
|
|
|
function sampev.onSendVehicleSync() |
|
|
|
|
time_send_trailer_sync = os.time() |
|
|
|
|
sampfuncsLog("onSendVehicleSync") |
|
|
|
|
end |
|
|
|
|
function sampev.onSendTrailerSync() |
|
|
|
|
time_send_trailer_sync = os.time() |
|
|
|
|
sampfuncsLog("send traile sync") |
|
|
|
|
|
|
|
|
|
-- if os.time() - time_send_trailer_sync < 2 then |
|
|
|
|
-- if isCharInAnyCar(PLAYER_PED) then |
|
|
|
|
-- local car = storeCarCharIsInNoSave(PLAYER_PED) |
|
|
|
|
-- local ptr = getCarPointer(car) |
|
|
|
|
-- local trailer = readMemory(ptr + 1224, 4, false) |
|
|
|
|
-- if readMemory(ptr + 1224, 4, false) == 0 and trailer > 0 then |
|
|
|
|
-- time_send_trailer_sync = os.time() |
|
|
|
|
-- local data = samp_create_sync_data("vehicle") |
|
|
|
|
-- data.send() |
|
|
|
|
-- local data = samp_create_sync_data("trailer") |
|
|
|
|
-- data.send() |
|
|
|
|
-- say("SYNC SEND") |
|
|
|
|
-- end |
|
|
|
|
-- end |
|
|
|
|
|
|
|
|
|
if os.time() - time_send_trailer_sync >= 2 then |
|
|
|
|
local data = samp_create_sync_data("vehicle") |
|
|
|
|
data.send() |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
function sampev.onVehicleSync(playerId, vehicleId, data) |
|
|
|
|
threads[#threads+1] = lua_thread.create(luChecker.vehicleSync, playerId, vehicleId, data) |
|
|
|
@ -4386,15 +4372,6 @@ function getPort(x, y, z) |
|
|
|
|
return minResult, resX, resY, resZ |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-->> TRAILER FIX |
|
|
|
|
|
|
|
|
|
time_send_trailer_sync = os.time() |
|
|
|
|
function trailer_fix_afk() |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function samp_create_sync_data(sync_type, copy_from_player) |
|
|
|
|
local ffi = require "ffi" |
|
|
|
|
local sampfuncs = require "sampfuncs" |
|
|
|
|