Помогите со скриптом

LuizhinhaLuz

Активный
Автор темы
186
24
Помогите, где затупил?
[12:48:22.169293] (system) logo.lua: Script terminated. (0E657A24)
 

Вложения

  • logo123.lua
    652 байт · Просмотры: 4

LelHack

Известный
451
125
Попробуй так
kod:
local allowed = {
    '51.83.179.217',
    '51.83.196.238',
    '80.66.71.65',
}
local new_logo = false
local IMAGE
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(0) end
    while true do
    wait(0)
       if new_logo == false then
            checkServer()
      end
    end
end
function checkServer()
    local ip, port = sampGetCurrentServerAddress()
    for i = 1, #allowed do
    if ip == allowed[i] then
    return true
        if IMAGE == nil then
            if doesFileExist(getWorkingDirectory()..'\\resource\\'..image_file.v) then
                IMAGE = imgui.CreateTextureFromFile(getWorkingDirectory()..'\\resource\\'..image_file.v)
            else
                imgui.Text('IMG NOT FOUND :(')
            end
        end
    local texture = renderLoadTextureFromFile('moonloader/resource/logo/florida.png')
    renderDrawTexture(texture, 0, 0, x, y, 0, 0xFFFFFFFF)
    new_logo = true
end
 

LuizhinhaLuz

Активный
Автор темы
186
24
Попробуй так
kod:
local allowed = {
    '51.83.179.217',
    '51.83.196.238',
    '80.66.71.65',
}
local new_logo = false
local IMAGE
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(0) end
    while true do
    wait(0)
       if new_logo == false then
            checkServer()
      end
    end
end
function checkServer()
    local ip, port = sampGetCurrentServerAddress()
    for i = 1, #allowed do
    if ip == allowed[i] then
    return true
        if IMAGE == nil then
            if doesFileExist(getWorkingDirectory()..'\\resource\\'..image_file.v) then
                IMAGE = imgui.CreateTextureFromFile(getWorkingDirectory()..'\\resource\\'..image_file.v)
            else
                imgui.Text('IMG NOT FOUND :(')
            end
        end
    local texture = renderLoadTextureFromFile('moonloader/resource/logo/florida.png')
    renderDrawTexture(texture, 0, 0, x, y, 0, 0xFFFFFFFF)
    new_logo = true
end
[13:20:36.920072] (error) logo321.lua: D:\private gta fps+\moonloader\logo321.lua:23: 'end' expected (to close 'if' at line 21) near 'if'
 

LuizhinhaLuz

Активный
Автор темы
186
24
Последнее редактирование: