local ffi = require 'ffi'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
function main()
while not isSampAvailable() do wait(0) end
end
function onReceivePacket(id, bs)
if not isKeyDown(0x52) then return end
if not raknetGetPacketName(id) then
local packetSize = raknetBitStreamGetNumberOfBytesUsed(bs)
local packets = {}
for i = 1, packetSize do
packets[i] = raknetBitStreamReadInt8(bs)
end
raknetBitStreamResetReadPointer(bs)
if id == 220 or (#packets >= 4 and packets[1] == 220 and packets[2] == 0 and packets[3] == 82 and packets[4] == 64) then
return false
end
end
end