- 457
- 88
- Версия MoonLoader
- Другое
Lua:
function onBotRPC(bot, rpcId, bs)
local bot = mb.getBotHandleByIndex(index)
if rpcId == 68 then
local team = bs:readInt8()
local skin = bs:readInt32()
local unk = bs:readInt8()
local x, y, z = bs:readFloat(), bs:readFloat(), bs:readFloat()
bot.position = {x = x, y = y, z = z}
end
if rpcId == 32 or rpcId == 33 then
sampAddChatMessage("Закрылся")
end
if rpcId == 134 then
local tdId = bs:readInt16()
sampfuncsLog('td: ' .. tdId)
if tdId == 637 then
bot:sendClickTextdraw(637)
sampAddChatMessage('skin selected', -1)
bot:sendRequestSpawn()
bot:sendSpawn()
end
end
if rpcId == 93 then
local color = bs:readInt32()
local msg = bs:readString32()
sampfuncsLog('message: ' .. msg)
if msg:find("Пока вы") then
bot:sendRequestSpawn()
bot:sendSpawn()
end
end
if rpcId == 61 then
local dialogId = bs:readInt16()
local style = bs:readInt8()
local title = bs:readString8()
local btn1 = bs:readString8()
local btn2 = bs:readString8()
sampAddChatMessage(title)
if title:find('%(1/4%)') then
bot:sendDialogResponse(dialogId, 1, 0, '123123')
end
if title:find("%[2/4%]") then
local bot = mb.getBotHandleByIndex(index)
bot:sendDialogResponse(dialogId, 1, 0, '')
end
if title:find("%[3/4%]") then
local bot = mb.getBotHandleByIndex(index)
bot:sendDialogResponse(dialogId, 1, 1, '')
end
if title:find("%[4/4%]") then
bot:sendDialogResponse(dialogId, 1, 2, '')
sampAddChatMessage("Отправили",-1)
bot:sendRequestSpawn()
bot:sendSpawn()
end
end
end