- 169
- 48
- Версия SA-MP
-
- Другая
Скрипт не работает! для рак самп, авторегистрация для монсера
local addon = require "addon"
local sampev = require "samp.events"
local password = "123123"
local email = "testlide@mail.ru"
local dialogState = "language"
function onLoad()
print("script test by obkak code from blasthack")
end
function onUnload()
print("SCRIPT HEUTEN!")
end
function sampev.onShowDialog(id, style, title, btn1, btn2, text)
if text then
print("Dialogг ID: ", id)
print("Dialog Text: ", text)
if dialogState == "language" then
if string.find(text, "язык") then
print("Yazik Dialog found")
wait(200)
sendDialogResponse(id, 1, -1, "")
dialogState = "password"
return false
end
elseif dialogState == "password" then
if string.find(text, "пароль") then
print("Parol okna")
wait(200)
sendDialogResponse(id, 1, -1, password)
dialogState = "email"
return false
end
elseif dialogState == "email" then
if string.find(text, "почту") or string.find(text, "почту") then
print("Pochta")
wait(200)
sendDialogResponse(id, 1, -1, email)
dialogState = "done"
return false
end
end
end
end
-- function onUpdate()
-- if dialogState == "done" then
-- print("Reg ok")
-- dialogState = nil
-- return true
-- end
-- end
именно диалог не отпровляеться
local addon = require "addon"
local sampev = require "samp.events"
local password = "123123"
local email = "testlide@mail.ru"
local dialogState = "language"
function onLoad()
print("script test by obkak code from blasthack")
end
function onUnload()
print("SCRIPT HEUTEN!")
end
function sampev.onShowDialog(id, style, title, btn1, btn2, text)
if text then
print("Dialogг ID: ", id)
print("Dialog Text: ", text)
if dialogState == "language" then
if string.find(text, "язык") then
print("Yazik Dialog found")
wait(200)
sendDialogResponse(id, 1, -1, "")
dialogState = "password"
return false
end
elseif dialogState == "password" then
if string.find(text, "пароль") then
print("Parol okna")
wait(200)
sendDialogResponse(id, 1, -1, password)
dialogState = "email"
return false
end
elseif dialogState == "email" then
if string.find(text, "почту") or string.find(text, "почту") then
print("Pochta")
wait(200)
sendDialogResponse(id, 1, -1, email)
dialogState = "done"
return false
end
end
end
end
-- function onUpdate()
-- if dialogState == "done" then
-- print("Reg ok")
-- dialogState = nil
-- return true
-- end
-- end
именно диалог не отпровляеться