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