RPC RakSampLite raknetBitStreamReadInt32 error

Po24

Участник
Автор темы
72
10
Версия SA-MP
  1. Другая
1698422492798.png


Lua:
local handler = require("samp.events.handlers")
local extra = require("samp.events.extra_types")
require("sampfuncs")
require("addon")
print('Arenafarm loaded, for RakSAMP LITE (DISCORD: sop1)')
local activespam = false
function onRunCommand(cmd)
    if cmd:match("^!spamcchas") then
        activespam = not activespam
        print(activespam and 'Activated!' or 'Deactivated!')
    end
end
function onLoad()
    setAutoPick(true)
    newTask(function()
        while true do
            wait(3000)
            if activespam then
                sendInput('/cchas')
                print('/cchas')
            end
        end
    end)
end
function onReceiveRPC(id, bs)
    if (id == 93) then
        --UINT32 dColor, UINT32 dMessageLength, char[] Message
        local color = raknetBitStreamReadInt32(bs)
        local len = raknetBitStreamReadInt32(bs)
        local str = raknetBitStreamReadString(bs, len)
        print('msg sent: '..str, -1)
        local result = string.match(str, "code%s+(%S+)")
        if result then
            print(result)
            sendInput('/code '..result)
        end
    end
end
 

Po24

Участник
Автор темы
72
10
Последнее редактирование: