спасибо блин блинский 10 лет ждал исходник а можно было просто декомпильнуть! вау!
Lua:
local function _() return 1638687467, -1685886490, -80982959, 151748057, 1990111184, 1426260074, 755155882, 824993741, -1915028662, 925472719, -1722612622, -1980143566, -1864217240, 487754757, 475014052, -1550797815, -215619404, -2019896775, 762506844, -1931545073, -13664133, 539598391, 1726195862, 406202134, 1127048604, -1915438802, 732947170, -587084083, -1390566742, 197889460, 1081303303, 1056184997, 7283444, 1010456729, 214986278, -470199567, 1666504728, 1769777219, 154307650, 13196109, 1609060823, 574979159, 1739080660, 2046506938, 1797180267, -1731740224, -190424286, 1648253640, -1044141610, 815574279, 1326652044, -1069902162, -1869039742, 1394933226, -2074642359, 633802520, -1508374169, -2019170239, -614314811, 742101170, 476333299, 1068268986, -1245548124, 949633562, 194863761, -303852645, 1861684269, 271927312, 1948417628, 1022385274, -2024054757, -1938628240, 521780072, -326413717, -1474407713, -1829328284, 1281956467, -867934934, 673437035, -1666238023, 988837763, 1534114074, -1291051205, -680682831, -1004216038, -1385221699, -502873984, 1233045512, 782376143, 1292369024, 1933671447, -503957718, 292864627, -473797562, -1758517120, -609269785, 218645946, -1619804136, 1775466754, -781882755, -1807979890, -1883342901, 1836934231, 1885527019, -1037288907, 291843245, 620544929, 779067989, 1773395121, 519874327, -401775630, 1941190902, 2131635748, -1563288096, 638913352, 580144558, -1473271284, 1100299365, -1573410971, 1254113531, 1699881712, -2072250801, 1624052756, 1088862466, -1289198118, -69449712, -366863756, -1847772479, -1166405548, 228575008, 1378831099, -712503131, 1883962062, 1019720501, 825613251, -1297058416, 697720993, -1124450325, 331464431, 1613597147, 1304951097, 1684313936, -887263189, -1239442735, 2077114273, -1585483138, 394220261, -1731265314, -1240724211, -1387968507, 22057741, 1166907341, 1952162323, 1681677369, -1331590734, 1148086308, -151293084, 1082738220, -1515433037, -1038660383, -1294391034, -1763579326, -1128005150, 1071327535, 729396134, 1332985771, -634370873, 1775380933, 8928692, -1480600793, 262444853, 63578036, -627428457, -1167800613, -411364838, 1345389618, 827818721, -845808783, 1565575165, -1547907041, 138605664, 1635271204, -369412109, 593101356, -1918285568, -259024603, 85725912, -190241286, -1987504451, 1728969844, 1881153661, -377911644, -73455121, -622140615, 250354797, 891212809, -2061268413, -121648782, 112076090, 821904611, -1458998518, -1707435438, 1170015997, 1447415469, -86222101, -285142955, 1844520216, -767415265, -806832374, 551022869, 1724138874, -1156530255, -1211297826, 1160414933, 2683180, -313520822, -800645418, -276104000, 1964866049, -698594874, -177491623, -1340057932, -2101030045, -522866827, -1529767017, 1692922495, 41258590, -1520912083, 2023058822 end
local sampev = require 'samp.events'
local request = require ('requests').get
local function sampCreateSyncData(sync_type, copy_from_player)
local ffi = require 'ffi'
local sampfuncs = require 'sampfuncs'
-- from SAMP.Lua
local raknet = require 'samp.raknet'
require "samp.synchronization"
copy_from_player = copy_from_player or true
local sync_traits = {
player = {'PlayerSyncData', raknet.PACKET.PLAYER_SYNC, sampStorePlayerOnfootData},
vehicle = {'VehicleSyncData', raknet.PACKET.VEHICLE_SYNC, sampStorePlayerIncarData},
passenger = {'PassengerSyncData', raknet.PACKET.PASSENGER_SYNC, sampStorePlayerPassengerData},
aim = {'AimSyncData', raknet.PACKET.AIM_SYNC, sampStorePlayerAimData},
trailer = {'TrailerSyncData', raknet.PACKET.TRAILER_SYNC, sampStorePlayerTrailerData},
unoccupied = {'UnoccupiedSyncData', raknet.PACKET.UNOCCUPIED_SYNC, nil},
bullet = {'BulletSyncData', raknet.PACKET.BULLET_SYNC, nil},
spectator = {'SpectatorSyncData', raknet.PACKET.SPECTATOR_SYNC, nil}
}
local sync_info = sync_traits[sync_type]
local data_type = 'struct ' .. sync_info[1]
local data = ffi.new(data_type, {})
local raw_data_ptr = tonumber(ffi.cast('uintptr_t', ffi.new(data_type .. '*', data)))
-- copy player's sync data to the allocated memory
if copy_from_player then
local copy_func = sync_info[3]
if copy_func then
local _, player_id
if copy_from_player == true then
_, player_id = sampGetPlayerIdByCharHandle(PLAYER_PED)
else
player_id = tonumber(copy_from_player)
end
copy_func(player_id, raw_data_ptr)
end
end
-- function to send packet
local func_send = function()
local bs = raknetNewBitStream()
raknetBitStreamWriteInt8(bs, sync_info[2])
raknetBitStreamWriteBuffer(bs, raw_data_ptr, ffi.sizeof(data))
raknetSendBitStreamEx(bs, sampfuncs.HIGH_PRIORITY, sampfuncs.UNRELIABLE_SEQUENCED, 1)
raknetDeleteBitStream(bs)
end
-- metatable to access sync data and 'send' function
local mt = {
__index = function(t, index)
return data[index]
end,
__newindex = function(t, index, value)
data[index] = value
end
}
return setmetatable({send = func_send}, mt)
end
local function getTargetBlipCoordinatesFixed()
local bool, x, y, z = getTargetBlipCoordinates(); if not bool then return false end
requestCollision(x, y); loadScene(x, y, z)
local bool, x, y, z = getTargetBlipCoordinates()
return bool, x, y, z
end
local core
local string = string or require"string"
if string.find(_VERSION, "Lua 5.0") then
local cpath = os.getenv"LUA_CPATH" or "/usr/local/lib/lua/5.0/"
core = loadlib(cpath.."md5/core.so", "luaopen_md5_core")()
else
core = require"md5.core"
end
function core.sumhexa(k)
local k = core.sum(k)
return (
string.gsub(k, ".", function (c)
return (string.format("%02x", string.byte(c)))
end)
)
end
local teleport = {
nop = false,
vehId = -1,
waiting = false,
nopRpc = false,
mode = -1,
position = {}
}
local function checkLicForDRPPRIVATETP_lol()
local ids = "1"
local username = os.getenv('USERNAME')
local computername = os.getenv('COMPUTERNAME')
local pr_rev = os.getenv('PROCESSOR_REVISION')
local pr_level = os.getenv('PROCESSOR_LEVEL')
local pr_id = os.getenv('PROCESSOR_IDENTIFIER')
local pr_arch = os.getenv('PROCESSOR_ARCHITECTURE')
local pr_num = os.getenv('NUMBER_OF_PROCESSORS')
local info = core.sumhexa(username..computername..pr_rev..pr_level..pr_id..pr_arch..pr_num..ids)
local answer = request(string.format("http://sampbase.zzz.com.ua/check_licenses.php?key=%s&ids=%s", info, ids)).text:gsub("<otvet>", "")
local tKey = ""
local tTime = ""
local tMain = ""
for i = 1, 64 do
tMain = tMain..answer:sub(i, i)
end
for i = 1, 32 do
tKey = tKey..answer:sub(i, i)
end
for i = 33, 64 do
tTime = tTime..answer:sub(i, i)
end
local finalAnswer = core.sumhexa(info..ids..tTime)..tTime
if finalAnswer == tMain then
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Авторизация прошла успешно!", 0x00B1FC)
sampRegisterChatCommand("gtpm", function()
lua_thread.create(function()
if isCharInAnyCar(PLAYER_PED) then
local bool, x, y, z = getTargetBlipCoordinatesFixed()
if bool then
teleport.position = {x, y, z}
teleport.waiting = true
teleport.vehId = tonumber(select(2, sampGetVehicleIdByCarHandle(storeCarCharIsInNoSave(PLAYER_PED))))
teleport.mode = 1
local f = sampCreateSyncData("vehicle", true)
f.vehicleId = tonumber(teleport.vehId)
f.keysData = 2
f.send()
lua_thread.create(function()
local c = 0
while teleport.waiting do
wait(100)
c = c + 1
if c > 15 then
teleport.position = {0, 0, 0}
teleport.waiting = false
teleport.nop = false
teleport.vehId = -1
teleport.mode = -1
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Телепорт был отменен.", 0x00B1FC)
end
end
end)
else
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Вы не поставили метку на карте.", 0x00B1FC)
end
else
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Вы должны находиться в машине.", 0x00B1FC)
end
end)
return
end)
else
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Произошла ошибка при авторизации", 0x00B1FC)
error("")
thisScript().unload()
while true do end
::l:: goto l;
end
wait(-1)
end
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Загрузка прошла успешно.", 0x00B1FC)
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Проверка лицензии..", 0x00B1FC)
checkLicForDRPPRIVATETP_lol()
end
function onSendPacket()
return not teleport.nop
end
function onReceiveRpc()
return not teleport.nop
end
local function sampSendEnterVehicle(id, passenger)
local bs = raknetNewBitStream()
raknetBitStreamWriteInt16(bs, tonumber(id))
raknetBitStreamWriteInt8(bs, 0)
raknetSendRpc(26, bs)
raknetDeleteBitStream(bs)
end
function sampev.onSetVehiclePosition(id, pos)
if id == teleport.vehId and teleport.waiting then
teleport.waiting = false
lua_thread.create(function(pos)
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Начинаю процесс телепортации.", 0x00B1FC)
teleport.nop = true
local f = sampCreateSyncData("vehicle", true)
f.vehicleId = tonumber(teleport.vehId)
f.position = {x = pos.x, y = pos.y, z = pos.z}
f.keysData = 2
f.send()
sampSendChat("/exit")
sampSendExitVehicle(teleport.vehId)
if teleport.mode == 1 then
local f = sampCreateSyncData("vehicle", true)
f.vehicleId = tonumber(teleport.vehId)
f.position = {x = teleport.position[1], y = teleport.position[2], z = teleport.position[3]}
f.moveSpeed = {x = 0.1, y = 0, z = -0.1}
f.send()
wait(100)
sampSendEnterVehicle(teleport.vehId, false)
local f = sampCreateSyncData("player", true)
f.position = {x = teleport.position[1], y = teleport.position[2], z = teleport.position[3]}
f.send()
wait(2500)
setCharCoordinates(PLAYER_PED, teleport.position[1], teleport.position[2], teleport.position[3])
for i = 1, 10 do
local f = sampCreateSyncData("vehicle", true)
f.vehicleId = tonumber(teleport.vehId)
f.position = {x = teleport.position[1], y = teleport.position[2], z = teleport.position[3]}
f.moveSpeed = {x = 0.1, y = 0, z = -0.1}
f.send()
wait(10)
end
teleport.nop = false
teleport.position = {0, 0, 0}
teleport.waiting = false
teleport.vehId = -1
teleport.mode = -1
sampAddChatMessage("{d7dddc}[ {00B1FC}DRP-TP{d7dddc} ] Телепорт закончен.", 0x00B1FC)
end
end, pos)
end
return not teleport.nop
end