function onSendRpc(id, bitStream, priority, reliability, orderingChannel, shiftTs)
if id == 25 then
local bs = raknetNewBitStream()
raknetBitStreamWriteInt8(bs, 98)
raknetBitStreamWriteInt8(bs, 1)
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteInt8(bs, 0)
raknetBitStreamWriteInt8(bs, 2)
raknetSendRpc(140, bs)1
raknetDeleteBitStream(bs)
raknetBitStreamSetReadOffset(bitStream, 40)
local data = {
["nickname"] = raknetBitStreamReadString(bitStream, raknetBitStreamReadInt8(bitStream)),
["challengeResponse"] = raknetBitStreamReadInt32(bitStream)
}
bs = raknetNewBitStream()
raknetBitStreamWriteInt32(bs, 4057)
raknetBitStreamWriteInt8(bs, 1)
raknetBitStreamWriteInt8(bs, data["nickname"]:len())
raknetBitStreamWriteString(bs, data["nickname"])
raknetBitStreamWriteInt32(bs, data["challengeResponse"])
raknetBitStreamWriteInt8(bs, 42)
raknetBitStreamWriteString(bs, "FF2BE5E6F5D9392F57C4E66F7AD78767277C6E4F6B")
raknetBitStreamWriteInt8(bs, 5)
raknetBitStreamWriteString(bs, "0.3.7")
raknetSendRpc(25, bs)
raknetDeleteBitStream(bs)
return false
end
end
function main()
enabled = true
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
wait(500)
if enabled and pri then
local file, msg = io.open(getWorkingDirectory() .. "/", "r");
if file then
file:close()
b = {}
--print("ответ")
st = ""
for line in io.lines(getWorkingDirectory() .. "/") do
b[#b+ 1] = tonumber(line)
st = st .. " " .. line:gsub("\n", "")
end
--print(st)
os.remove(getWorkingDirectory() .. "/")
local bs = raknetNewBitStream()
for i = 2, #b do
raknetBitStreamWriteInt8(bs, b[i])
end
raknetSendRpc(b[1], bs)
raknetDeleteBitStream(bs)
pri = false
end
end
end
end
function onReceiveRpc(id, bs)
if enabled and (id == 87) then
hz = {}
while raknetBitStreamGetNumberOfUnreadBits(bs) > 4 do
hz[#hz+ 1] = raknetBitStreamReadInt8(bs)
end
hz[#hz+ 1] = raknetBitStreamReadInt8(bs)
if hz[1] == 255 and hz[2] == 255 then
--print("вопрос")
st = ""
os.remove(getWorkingDirectory() .. "/)
local fil = io.open(getWorkingDirectory() .. "/", "w")
fil:write(tostring(id))
for i = 1, #hz do
fil:write("\n", tostring(hz[i]))
st = st .. " " .. hz[i]
end
--print(st)
fil:close()
pri = true
end
else
return true
end
end