манку хлебал
Потрачен
- 302
- 122
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Тема -> FAQ -> АвтологинНу не тебя же спрашивали
Делаешь все по аналогии
Тема -> FAQ -> АвтологинНу не тебя же спрашивали
Спасибо,но куда вставлять этот текстТема -> FAQ -> Автологин
Делаешь все по аналогии
сюда, и получается вот такой луа файлик с авторегойСпасибо,но куда вставлять этот текст
этот раксамп вроде такой проблемой не страдает (по словам людей которые его используют)а? Скриптовый язык? Бот написан на базе стокового раксампа, а там были проблемы с утечками в ракнете. Если автор не фиксанул - клиент будет ложиться через время или сильно лагать.
Так сделай выбор скина. Поскажу: это текстдравычет та авторегистрация перестала работать, он втыкается на стадии выбора скина
чет та авторегистрация перестала работать, он втыкается на стадии выбора скина
local sampev = require("samp.events")
require("Tasking")
require("addon")
local nickname = getNick()
function onLoad()
print("loaded")
print(nickname)
end
function onUpdate()
Tasking.tick()
end
function sampev.onShowDialog(id, style, title, btn1, btn2, text)
local function sendDialogResponse(button, list, input)
local bs = bitStream.new()
bs:writeUInt16(id)
bs:writeUInt8(button)
bs:writeInt16(list)
bs:writeUInt8(input:len())
bs:writeString(input)
bs:sendRPC(62)
end
if title: find("1/4") then
sendDialogResponse(1, -1, "ТВОЙ ПАРОЛЬ")
return
end
if title: find("2/4") then
sendDialogResponse(1, 1, "")
return
end
if title: find("3/4") then
sendDialogResponse(1, 1, "")
return
end
if title: find("4/4") then
sendDialogResponse(1, 1, "")
return
end
end
function sampev.onShowTextDraw(id, data)
if data.position.x == 233 then
sendClickTextdraw(id)
end
end
не работаетLua:local sampev = require("samp.events") require("Tasking") require("addon") local nickname = getNick() function onLoad() print("loaded") print(nickname) end function onUpdate() Tasking.tick() end function sampev.onShowDialog(id, style, title, btn1, btn2, text) local function sendDialogResponse(button, list, input) local bs = bitStream.new() bs:writeUInt16(id) bs:writeUInt8(button) bs:writeInt16(list) bs:writeUInt8(input:len()) bs:writeString(input) bs:sendRPC(62) end if title: find("1/4") then sendDialogResponse(1, -1, "ТВОЙ ПАРОЛЬ") return end if title: find("2/4") then sendDialogResponse(1, 1, "") return end if title: find("3/4") then sendDialogResponse(1, 1, "") return end if title: find("4/4") then sendDialogResponse(1, 1, "") return end end function sampev.onShowTextDraw(id, data) if data.position.x == 233 then sendClickTextdraw(id) end end
выдает вот это - \scripts\libs\samp\events\core.lua:21: attempt to call global 'isSampLoaded' (a nil value)Lua:local sampev = require("samp.events") require("Tasking") require("addon") local nickname = getNick() function onLoad() print("loaded") print(nickname) end function onUpdate() Tasking.tick() end function sampev.onShowDialog(id, style, title, btn1, btn2, text) local function sendDialogResponse(button, list, input) local bs = bitStream.new() bs:writeUInt16(id) bs:writeUInt8(button) bs:writeInt16(list) bs:writeUInt8(input:len()) bs:writeString(input) bs:sendRPC(62) end if title: find("1/4") then sendDialogResponse(1, -1, "ТВОЙ ПАРОЛЬ") return end if title: find("2/4") then sendDialogResponse(1, 1, "") return end if title: find("3/4") then sendDialogResponse(1, 1, "") return end if title: find("4/4") then sendDialogResponse(1, 1, "") return end end function sampev.onShowTextDraw(id, data) if data.position.x == 233 then sendClickTextdraw(id) end end
не прошло и ночи, разобрался, все заработало, причиной была отсутствовала одна библиотекаLua:local sampev = require("samp.events") require("Tasking") require("addon") local nickname = getNick() function onLoad() print("loaded") print(nickname) end function onUpdate() Tasking.tick() end function sampev.onShowDialog(id, style, title, btn1, btn2, text) local function sendDialogResponse(button, list, input) local bs = bitStream.new() bs:writeUInt16(id) bs:writeUInt8(button) bs:writeInt16(list) bs:writeUInt8(input:len()) bs:writeString(input) bs:sendRPC(62) end if title: find("1/4") then sendDialogResponse(1, -1, "ТВОЙ ПАРОЛЬ") return end if title: find("2/4") then sendDialogResponse(1, 1, "") return end if title: find("3/4") then sendDialogResponse(1, 1, "") return end if title: find("4/4") then sendDialogResponse(1, 1, "") return end end function sampev.onShowTextDraw(id, data) if data.position.x == 233 then sendClickTextdraw(id) end end
да только нахуя тебе это блять надоВозможна работа с вебсокетами?
require("addon")
local sampev = require("samp.events")
function sampev.onTextDrawShow(textDrawId, data)
if textDrawId == 6122 or textDrawId == 6123 then
newTask(function()
wait(100)
sendClickTextdraw(6122)
end)
end
onShowTextDraw должно бытьпочему не работает?
Lua:require("addon") local sampev = require("samp.events") function sampev.onTextDrawShow(textDrawId, data) if textDrawId == 6122 or textDrawId == 6123 then newTask(function() wait(100) sendClickTextdraw(6122) end) end
запускается без ошибок но функцию эту игнорит вообще