slot0 = require("lib.samp.events")
if ""[1337] == "228" then
-- Nothing
end
function main()
sampRegisterChatCommand("pd", tt)
sampRegisterChatCommand("f", cmd_f)
sampRegisterChatCommand("p", cmd_g)
if not isSampfuncsLoaded() or not isSampLoaded() then
return
end
while not isSampAvailable() do
wait(100)
end
sampAddChatMessage("{8A2BE2}[PayDay]: {FFFFFF}Загружен!", -1)
sampAddChatMessage("{8A2BE2}[PayDay]: {FFFFFF}Автор: {8A2BE2}QuickScoope", -1)
sampAddChatMessage("{8A2BE2}[PayDay]: {FFFFFF}Специально для: {8A2BE2}Гофрiка", -1)
wait(-1)
end
function slot0.onServerMessage(slot0, slot1)
if (slot1:find("__________________________________") and slot0 == 1941201407 or slot1:find("Для получения PayDay вы должны отыграть минимум 20 минут.") and slot0 == -10270721) and state then
lua_thread.create(function ()
wait(50)
sampProcessChatInput("/phone")
wait(50)
setVirtualKeyDown(13, true)
wait(30)
setVirtualKeyDown(13, false)
wait(100)
sampSendClickTextdraw(2117)
sampSendDialogResponse(966, 1, 9, -1)
wait(50)
sampSetChatInputText("/f ")
end)
end
end
function slot0.onShowDialog(slot0, slot1, slot2, slot3, slot4, slot5)
if slot0 == 966 and i then
sampSendDialogResponse(966, -1, 10, -1)
return false
end
if slot5:find("дома отображается только") and i then
for slot9 in slot5:gmatch("[^\n\r]+") do
if slot9:find("Слетел") then
for slot13 in slot9:gmatch("[^\n\r\t]+") do
id = slot13:match("ID: {C9B931}(.+){FFFFFF}")
if id ~= nil then
sampSendChat("/findihouse " .. id)
end
end
end
end
return false
end
end
function cmd_g(slot0)
if #slot0 == 0 then
sampAddChatMessage("{8A2BE2}[House]{FFFFFF} Укажите айди дома.", -1)
else
lua_thread.create(function ()
sampAddChatMessage("{8A2BE2}[House]{FFFFFF} Поиск дома " .. uv0, -1)
wait(50)
sampSendChat("/findihouse " .. uv0)
wait(100)
sampProcessChatInput("/tpc")
end)
end
end
function cmd_f(slot0)
if #slot0 == 0 then
sampAddChatMessage("{8A2BE2}[House]{FFFFFF} Укажите айди дома.", -1)
else
lua_thread.create(function ()
sampAddChatMessage("{8A2BE2}[House]{FFFFFF} Поиск дома " .. uv0, -1)
wait(50)
sampSendChat("/findihouse " .. uv0)
end)
end
end
function tt()
state = not state
if state then
sampAddChatMessage("{8A2BE2}[PayDay]: {FFFFFF}Активирован", -1)
else
sampAddChatMessage("{8A2BE2}[PayDay]: {FFFFFF}Деактивирован.", -1)
end
end