помогите с создаением GM

Kegwineye.

Участник
Автор темы
478
20
помогите с созданием ГМа, код ниже
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local checkinfobar = imgui.ImBool()
local checkdopinfobar = imgui.ImBool()
local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Arial Black', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end

-- открытие меню
sampRegisterChatCommand('ch', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
                   imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)
        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.Checkbox(u8'Информация о игроках', settings.info)
             imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
        imgui.End()
    end
end
 

Rice.

Известный
Модератор
1,711
1,508
помогите с созданием ГМа, код ниже
Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local checkinfobar = imgui.ImBool()
local checkdopinfobar = imgui.ImBool()
local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(true),
    line = imgui.ImBool(true),
    info = imgui.ImBool(true),
}
local font = renderCreateFont('Arial Black', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end

-- открытие меню
sampRegisterChatCommand('ch', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
                   imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFff004d)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, 'ID: '..id..'\nNick: '..sampGetPlayerNickname(id)..'\nHP: '..getCharHealth(v)..'\nARM: '..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)
        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.Checkbox(u8'Информация о игроках', settings.info)
             imgui.Checkbox(u8"Инфобар", checkinfobar)
     imgui.Checkbox(u8"Дополнение к инфобару", checkdopinfobar)
        imgui.End()
    end
end
 

Kegwineye.

Участник
Автор темы
478
20
setCharProofs(playerPed, true, true, true, true, true)
и все ? Или надо прописывать setCharProofs(Ped ped, bool BP, bool FP, bool EP, bool CP, bool MP) ?



setCharProofs(playerPed, false, false, false, false, false)
else
setCharProofs(playerPed, false, false, false, false, false)
end

будет защищать от пуль ?

setCharProofs(playerPed, true, true, true, true, true)
и все ? Или надо прописывать setCharProofs(Ped ped, bool BP, bool FP, bool EP, bool CP, bool MP) ?




setCharProofs(playerPed, false, false, false, false, false)
else
setCharProofs(playerPed, false, false, false, false, false)
end

будет защищать от пуль ?
@Rice.
 
Последнее редактирование:

Rice.

Известный
Модератор
1,711
1,508
setCharProofs(playerPed, true, true, true, true, true)
и все ? Или надо прописывать setCharProofs(Ped ped, bool BP, bool FP, bool EP, bool CP, bool MP) ?




setCharProofs(playerPed, false, false, false, false, false)
else
setCharProofs(playerPed, false, false, false, false, false)
end

будет защищать от пуль ?
setCharProofs(PLAYER_PED, true, true, true, true, true) защищает от всего

true/false по порядку с этими аргументами
1637482731701.png
 

Kegwineye.

Участник
Автор темы
478
20
Lua:
function main()
    -- other code
   
    setCharProofs(PLAYER_PED, true, true, true, true, true)
    wait(-1)
end
так у меня так
Lua:
 if settings.GodMode.v then 
                setCharProofs(PLAYER_PED, true, true, true, true, true)
            else
                setCharProofs(PLAYER_PED, true, true, true, true, true)
            end

Сделать просто так ?
Lua:
if settings.GodMode.v then
                setCharProofs(PLAYER_PED, true, true, true, true, true)
                wait (-1)
            end
 

meowprd

Тот самый Котовский
Проверенный
1,280
713
так у меня так
Lua:
 if settings.GodMode.v then
                setCharProofs(PLAYER_PED, true, true, true, true, true)
            else
                setCharProofs(PLAYER_PED, true, true, true, true, true)
            end

Сделать просто так ?
Lua:
if settings.GodMode.v then
                setCharProofs(PLAYER_PED, true, true, true, true, true)
                wait (-1)
            end
Lua:
function main()
    -- other code
    while true do
        wait(0)
         if settings.GodMode.v then
             setCharProofs(PLAYER_PED, true, true, true, true, true)
         else
             setCharProofs(PLAYER_PED, false, false, false, false, false)
         end
    end
end
 
  • Нравится
Реакции: Rice.

meowprd

Тот самый Котовский
Проверенный
1,280
713

Kegwineye.

Участник
Автор темы
478
20
@Котовский. че не так с кодом тут ?

Lua:
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8

local activate = true

local checkinfobar = imgui.ImBool()
local checkdopinfobar = imgui.ImBool()
local themes = import "resource/imgui_themes.lua"
local window = imgui.ImBool(false)
local settings = {
    enabled = imgui.ImBool(false),
    line = imgui.ImBool(false),
    info = imgui.ImBool(false),
    call = imgui.ImBool(false),
    GodMode = imgui.ImBool(false),
    Bone = imgui.ImBool(false),
    BoneBox = imgui.ImBool(false),
    gunskill = imgui.ImBool(false)
}
local font = renderCreateFont('Arial Black', 10, 5)

function main()
    while not isSampAvailable() do wait(200) end

-- открытие меню
sampRegisterChatCommand('ch', function() window.v = not window.v end)
    imgui.Process = false
    window.v = true  --show window
    imgui.SwitchContext()
    themes.SwitchColorTheme(5)
    while true do
        wait(0)
        imgui.Process = window.v

        if settings.GodMode.v then
             setCharProofs(PLAYER_PED, true, true, true, true, true)
         else
             setCharProofs(PLAYER_PED, false, false, false, false, false)
         end
        if settings.enabled.v then
            for k, v in pairs(getAllChars()) do
                local myX, myY, myZ = getCharCoordinates(PLAYER_PED)
                local x, y, z = getCharCoordinates(v)
                local r_myX, r_myY = convert3DCoordsToScreen(myX, myY, myZ)
                local r_X, r_Y = convert3DCoordsToScreen(x, y, z)
                if settings.line.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        renderDrawLine(r_myX, r_myY, r_X, r_Y, 3, 0xFFA9A9A9)
                    end
                end
                if settings.info.v then
                    if v ~= PLAYER_PED and isCharOnScreen(v) then
                        _, id = sampGetPlayerIdByCharHandle(v)
                        renderFontDrawText(font, '\n{C0C0C0}Nick: {FF4500}' ..sampGetPlayerNickname(id).. '  {C0C0C0}[ID]: '..id..'\n{FF0000}HealthPoint: {FFFFFF}'..sampGetPlayerHealth(id)..'\n{4169E1}Armour: {FFFFFF}'..getCharArmour(v), r_X, r_Y, 0xFFFFFFFF, 0x90000000)
                    end
                end
            end
        end
    end
end

if settings.gunskill.v then
           registerIntStat(70, 1000.0)
        registerIntStat(71, 1000.0)
        registerIntStat(72, 1000.0)
        registerIntStat(76, 1000.0)
       registerIntStat(77, 1000.0)
      registerIntStat(78, 1000.0)
    registerIntStat(79, 1000.0)
end

function imgui.OnDrawFrame()
    if window.v then
        imgui.SetNextWindowPos(imgui.ImVec2(650.0, 250.0), imgui.Cond.FirstUseEver)
        imgui.SetNextWindowSize(imgui.ImVec2(608.0, 370.0), imgui.Cond.FirstUseEver)
        imgui.Begin('Multi-Cheat Menu | By Han', window)
        imgui.BeginChild("Osnova", imgui.ImVec2(600, 337), true)
        if imgui.CollapsingHeader('WallHack Settings') then
        imgui.Checkbox(u8'Включить WallHack', settings.enabled)
        imgui.Checkbox(u8'Линия к игрокам', settings.line)
        imgui.SameLine()
        imgui.Checkbox(u8'Информация о игроках', settings.info)
             imgui.Checkbox(u8"Кости игрока", settings.Bone)
             imgui.SameLine()
     imgui.Checkbox(u8"Бокс на игроке", settings.BoneBox)
 end
     imgui.Separator()
             if imgui.CollapsingHeader(u8'Полезные Функции') then
             imgui.Checkbox(u8"Бессмертие", settings.GodMode)
             imgui.Checkbox(u8"Фулл скиллы оружия", settings.gunskill)
        end
             imgui.Separator()
     imgui.EndChild()
        imgui.End()
    end
end

@Котовский.
 
Последнее редактирование: