added msg /f after invite

update
rubin 2 years ago
parent d47bf56fc2
commit 1f2e8af3ab
  1. 29
      mafia-tools.lua

@ -143,7 +143,7 @@ menu.update = function()
end
end
menu.show = { true, "main" }
end, config.data.room}
end, config.data.room, "Введите название комнаты!"}
end
},
{ -->> Участники
@ -289,7 +289,7 @@ menu.update = function()
end
end
menu.show = { true, "main" }
end, config.data.invite_helper.lvl}
end, config.data.invite_helper.lvl, "Введите минимальный уровень для инвайта!"}
end
},
{ -->> Авто ранг вкл выкл
@ -313,7 +313,20 @@ menu.update = function()
end
end
menu.show = { true, "main" }
end, config.data.invite_helper.rank}
end, config.data.invite_helper.rank, "Введите какой ранг давать после инвайта!"}
end
},
{ -->> Сообщение в чат после инвайта
title = "{"..config.data.font.color1.."}"..">{ffffff} Сообщение в рацию\t"..config.data.invite_helper.message,
click = function(button, list, input , outs)
if button ~= 1 then return end
menu.show = { true, "edit", function(button, list, input, outs)
if button == 1 then
config.data.invite_helper.message = input
config.save(config.data)
end
menu.show = { true, "main" }
end, config.data.invite_helper.message, "{name} - Заменится на никнейм игрока которого приняли\nЧтобы не отправлять сообщение оставьте поле пустым!"}
end
},
{ -->> Клавиша инвайта
@ -343,7 +356,7 @@ menu.update = function()
["edit"] = {
settings = {title = "mafia-tools" ,style = 1 ,btn1 = "Выбрать" ,btn2 = "Назад" ,forward = "{ffffff}" ,backwards = "\n" ,score = true},
{
text = "",
text = menu.show[5],
{
click = function(button, list, input, outs)
menu.show[3](button, list, input, outs)
@ -423,6 +436,10 @@ invite_helper.onServerMessage = function(color, message)
end
end
end
if #config.data.invite_helper.message > 0 then
name = name:gsub("_", " ")
antiflood.send[#antiflood.send+1] = string.format("/r %s", config.data.invite_helper.message:gsub("{name}", name))
end
end
end
invite_helper.onSendCommand = function(cmd)
@ -789,7 +806,8 @@ config.default = {
lvl = 7,
auto_rank = true,
rank = 7,
key = "VK_I"
key = "VK_I",
message = "Добро пожаловать, {name}!"
}
}
config.directory = string.format("%s\\moonloader\\config\\%s\\", getGameDirectory(), thisScript().name)
@ -1255,5 +1273,6 @@ utf8({ "sampAddChatMessage" }, "Utf8ToAnsi")
utf8({ "print" }, "Utf8ToAnsi")
utf8({ "renderGetFontDrawTextLength" }, "Utf8ToAnsi")
utf8({ "renderFontDrawText" }, "Utf8ToAnsi")
utf8({ "sampSetCurrentDialogEditboxText" }, "Utf8ToAnsi")
utf8({ "sampHasDialogRespond" }, nil, "AnsiToUtf8")
utf8({ "sampev", "onServerMessage" }, "AnsiToUtf8", "Utf8ToAnsi")
Loading…
Cancel
Save