- 269
- 27
- Версия MoonLoader
- .026-beta
Привет всем. У меня оно что-то странное, выдаёт символы из воздуха. Я не знаю как это фиксить. Помогите пожалуйста!
Lua:
local pnakaz = {
'JAIL',
'MUTE',
'WARN',
'BAN',
'OFFJAIL',
'OFFMUTE',
'OFFWARN',
'OFFBAN'
}
elseif nakazSwitch == 4 then
local resX, resY = getScreenResolution()
local sizeX, sizeY = 695, 255
imgui.PushFont(myFont)
imgui.SetNextWindowPos(imgui.ImVec2(resX / 2, resY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(sizeX, sizeY), imgui.Cond.FirstUseEver)
imgui.Begin(u8'Другое', nakazMenu, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse + imgui.WindowFlags.NoTitleBar)
imgui.CenterText(u8'Выдача наказания игроку')
imgui.SameLine(0,295)
ad.CloseButton('MainClose', nakazMenu, 25)
imgui.BeginChild('##nakazPlayer', imgui.ImVec2(500,165), 0)
imgui.InputTextWithHint(u8'##1Введите ID', u8'Введите ID', input_playerID, sizeof(input_playerID), imgui.InputTextFlags.CharsDecimal)
imgui.SameLine()
if imgui.Button(u8'Выдать наказание') then
local id = tonumber(input_playerID[0])
local name = u8:decode(input_playerName[0])
local reason = u8:decode(input_playerReason[0])
local duration = slider_nakaz[0]
local selected = radioInt[0]
if id == nil and name == '' then
toolsErrorText('Укажите ID или имя игрока!')
return
end
if selected == 0 then
toolsErrorText(string.format('/mute %s %d %s', id or name, duration, reason))
elseif selected == 1 then
toolsErrorText(string.format('/jail %s %d %s', id or name, duration, reason))
elseif selected == 2 then
toolsErrorText(string.format('/warn %s %s', id or name, reason))
elseif selected == 3 then
toolsErrorText(string.format('/ban %s %d %s', id or name, reason))
elseif selected == 4 then
toolsErrorText(string.format('/offjail %s %d %s', name, duration, reason))
elseif selected == 5 then
toolsErrorText(string.format('/offmute %s %d %s', name, duration, reason))
elseif selected == 6 then
toolsErrorText(string.format('/offwarn %s %s', id or name, reason))
elseif selected == 7 then
toolsErrorText(string.format('/offban %s %d %s', name, duration, reason))
else
toolsErrorText('Не выбрано наказание!')
end
end
imgui.InputTextWithHint(u8'##9Введите имя', u8'Введите имя', input_playerName, sizeof(input_playerName))
imgui.SameLine()
imgui.Button(u8'Выдать наказание')
imgui.InputTextWithHint(u8'##2Введите причину', u8'Введите причину', input_playerReason, sizeof(input_playerReason))
imgui.SliderInt(u8'', slider_nakaz, 1, 30)
imgui.Separator()
for i = 0, 7 do
if imgui.RadioButtonIntPtr(pnakaz[i + 1], radioInt, i) then
radioInt[0] = i
end
if (i + 1) % 4 ~= 0 then
imgui.SameLine()
end
end
imgui.EndChild()
end
Последнее редактирование: