Проблема с mimgui | inicfg

NedoLuaScripter

Участник
Автор темы
56
7
Версия MoonLoader
Другое
Привет всем, Я пишу хелпер для цл, и сделал авто определение устава Я записал переменную server из onInitGame в ini Я заставил условие прочитать переменную но опять выходит феникс, даже если я на 27 сервере вот условие:
Lua:
  elseif CurrentTab == 2 then
  if ini.cfg.server == "Arizona RP | Glendale | X4 Payday!" or "Arizona RP | Glendale" then
  for line11 in result11.text:gmatch("[^\r\n]+") do
  imgui.TextWrapped(line11)
  end
  end
p.s monetloader 3.0.0-os

.
 
Последнее редактирование:
  • Ха-ха
Реакции: 1NEXPL1CA

NedoLuaScripter

Участник
Автор темы
56
7
За то чстретил чела с тг на бх
Я просто создал массив который вызывает результаты устава, создал переменную serverText внутри которой servers[ini.cfg.server] и разделил результат на строки на строки, после текст враппедом вставил. Код прикреплю.
Lua:
elseif CurrentTab == 2 then
  local servers = {
  ["Arizona RP | Phoenix | X4 Payday!"] = result,
  ["Arizona Role Play | Phoenix"] = result,
  ["Arizona RP | Tucson | X4 Payday!"] = result1,
  ["Arizona Role Play | Tucson"] = result1,
  ["Arizona RP | Scottdale | X4 Payday!"] = result2,
  ["Arizona Role Play | Scottdale"] = result2,
  ["Arizona RP | Chandler | X4 Payday!"] = result3,
  ["Arizona Role Play | Chandler"] = result3,
  ["Arizona RP | Brainburg | X4 Payday!"] = result4,
  ["Arizona Role Play | Brainburg"] = result4,
  ["Arizona RP | Saintrose | X4 Payday!"] = result5,
  ["Arizona Role Play | Saintrose"] = result5,
  ["Arizona RP | Mesa | X4 Payday!"] = result6,
  ["Arizona Role Play | Mesa"] = result6,
  ["Arizona RP | Red-Rock | X4 Payday!"] = result7,
  ["Arizona Role Play | Red-Rock"] = result7,
  ["Arizona RP | Yuma | X4 Payday!"] = result8,
  ["Arizona Role Play | Yuma"] = result8,
  ["Arizona RP | Surprise | X4 Payday!"] = result9,
  ["Arizona Role Play | Surprise"] = result9,
  ["Arizona RP | Prescott | X4 Payday!"] = result10,
  ["Arizona Role Play | Prescott"] = result10,
  ["Arizona RP | Glendale | X4 Payday!"] = result11,
  ["Arizona Role Play | Glendale"] = result11,
  ["Arizona RP | Kingman | X4 Payday!"] = result12,
  ["Arizona Role Play | Kingman"] = result12,
  ["Arizona RP | Winslow | X4 Payday!"] = result13,
  ["Arizona Role Play | Winslow"] = result13,
  ["Arizona RP | Payson | X4 Payday!"] = result14,
  ["Arizona Role Play | Payson"] = result14,
  ["Arizona RP | Show Low | X4 Payday!"] = result15,
  ["Arizona Role Play | Show Low"] = result15,
  ["Arizona RP | Casa-Grande | X4 Payday!"] = result16,
  ["Arizona Role Play | Casa-Grande"] = result16,
  ["Arizona RP | Page | X4 Payday!"] = result17,
  ["Arizona Role Play | Page"] = result17,
  ["Arizona RP | Sun-City | X4 Payday!"] = result18,
  ["Arizona Role Play | Sun-City"] = result18,
  ["Arizona RP | Queen-Creek | X4 Payday!"] = result19,
  ["Arizona Role Play | Queen-Creek"] = result19,
  ["Arizona RP | Gilbert | X4 Payday!"] = result20,
  ["Arizona Role Play | Gilbert"] = result20,
  ["Arizona RP | Sedona | X4 Payday!"] = result21,
  ["Arizona Role Play | Sedona"] = result21,
  ["Arizona RP | Holiday | X4 Payday!"] = result22,
  ["Arizona Role Play | Holiday"] = result22,
  ["Arizona RP | Wednesday | X4 Payday!"] = result23,
  ["Arizona Role Play | Wednesday"] = result23,
  ["Arizona RP | Yava | X4 Payday!"] = result24,
  ["Arizona Role Play | Yava"] = result24,
  ["Arizona RP | Faraway | X4 Payday!"] = result20,
  ["Arizona Role Play | Faraway"] = result20,
  ["Arizona RP | Bumble Bee | X4 Payday!"] = result25,
  ["Arizona Role Play | Bumble Bee"] = result25,
  ["Arizona RP | Mobile I | X4 Payday!"] = result26,
  ["Arizona Role Play | Mobile I"] = result26,
  ["Arizona RP | Mobile II | X4 Payday!"] = result27,
  ["Arizona Role Play | Mobile II"] = result27,
  ["Arizona RP | Mobile III | X4 Payday!"] = result28,
  ["Arizona Role Play | Mobile III"] = result28
}

  local serverText = servers[ini.cfg.server]
  if serverText then
    for line in serverText:gmatch("[^\r\n]+") do
      imgui.TextWrapped(line)
    end
  end