Arizona проверка айпи

archlinux

Новичок
Автор темы
23
1
есть скрипт котторый показывает айпи с которого ты зашел?
 
Решение
Lua:
local requests = require 'requests'
local samp = require 'samp.events'

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while not sampIsLocalPlayerSpawned() do wait(100) end

    lua_thread.create(function()
        wait(1000)
        
        local response = requests.get('https://api.ipify.org')
        
        if response.status_code == 200 then
            local my_ip = response.text
            sampAddChatMessage("{3399FF}[IP-Info]{FFFFFF} Вы успешно подключились! Ваш IP: {00FF00}" .. my_ip, -1)
        else
            sampAddChatMessage("{3399FF}[IP-Info]{FF0000} Не удалось определить IP", -1)
        end
    end)

    wait(-1)
end

менталейшн

Известный
1,705
336
Lua:
local requests = require 'requests'
local samp = require 'samp.events'

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end

    while not sampIsLocalPlayerSpawned() do wait(100) end

    lua_thread.create(function()
        wait(1000)
        
        local response = requests.get('https://api.ipify.org')
        
        if response.status_code == 200 then
            local my_ip = response.text
            sampAddChatMessage("{3399FF}[IP-Info]{FFFFFF} Вы успешно подключились! Ваш IP: {00FF00}" .. my_ip, -1)
        else
            sampAddChatMessage("{3399FF}[IP-Info]{FF0000} Не удалось определить IP", -1)
        end
    end)

    wait(-1)
end
 
  • Нравится
Реакции: impachi