Помогите

BUGIUA

Известный
Автор темы
55
5
Версия MoonLoader
.026-beta
Можите вписать чтобы после инвайта делался скрин
Код:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage("{FFFF00}INVITES:{E57676}Script INVITES by BUGI for Brain",-1)

    while true do
        wait(0)
        invites()
    end
end

function invites()
    state = wasKeyPressed(90)
    if state then
        result, ped = getCharPlayerIsTargeting(playerhandle)
        if result then
            ingame,id = sampGetPlayerIdByCharHandle(ped)
            if ingame then
                 sampSendChat('/invite '.. id)
                 sampAddChatMessage("The person was accepted",-1)
                                 wait(2000)
                                 function makeScreenshot(disable) -- ТУТ Я ПЫТАЛСЯ СДЕЛАТЬ СКРИН МОЖИТЕ УДАЛИТЬ ЭТУ ФУНКЦИЮ(
    if disable then displayHud(false) sampSetChatDisplayMode(0) end
    require('memory').setuint8(sampGetBase() + 0x119CBC, 1)
    if disable then displayHud(true) sampSetChatDisplayMode(2) end
end                                                               --           )
        else
            sampAddChatMessage("The person was not accepted",-1)
                    end
        end
    end
end
 

#kerosin

🔥
Проверенный
241
152
Lua:
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampAddChatMessage("{FFFF00}INVITES:{E57676}Script INVITES by BUGI for Brain",-1)

    while true do
        wait(0)
        invites()
    end
end

function invites()
    state = wasKeyPressed(90)
    if state then
        result, ped = getCharPlayerIsTargeting(playerhandle)
        if result then
            ingame,id = sampGetPlayerIdByCharHandle(ped)
            if ingame then
                 sampSendChat('/invite '.. id)
                 sampAddChatMessage("The person was accepted",-1)
                 wait(2000)
                 makeScreenshot()
        else
            sampAddChatMessage("The person was not accepted",-1)
             end
        end
    end
end

function makeScreenshot(disable)
    if disable then displayHud(false) sampSetChatDisplayMode(0) end
    require('memory').setuint8(sampGetBase() + 0x119CBC, 1)
    if disable then displayHud(true) sampSetChatDisplayMode(2) end
end