1
0
forked from MTSR/jail

Отредактировать сообщения в чат

- редакция перевода;
- реорганизация отправки сообщений чата в функции посадки в тюрьму
This commit is contained in:
Aleksandr Avdeev 2024-10-16 13:17:17 +03:00
parent f07ec4feec
commit db4633f931
2 changed files with 6 additions and 8 deletions

View File

@ -46,16 +46,14 @@ jail.add_jail = function(self_player_name, player_name)
table.insert(prisoners_list, player_name) table.insert(prisoners_list, player_name)
jail.set_permissions_for_the_jail(player_name) jail.set_permissions_for_the_jail(player_name)
local player = minetest.env:get_player_by_name(player_name) local player = minetest.env:get_player_by_name(player_name)
minetest.chat_send_all(minetest.colorize("red",
"" .. player_name .. " " .. S("has been sent to jail by") .. " " .. self_player_name))
if (player) then if (player) then
player:setpos(jail.jailpos) player:setpos(jail.jailpos)
minetest.chat_send_player(player_name, minetest.colorize("red", S("You have been sent to jail"))) minetest.chat_send_player(player_name, minetest.colorize("red", S("You have been sent to jail")))
minetest.chat_send_all(minetest.colorize("red",
"" .. player_name .. " " .. S("has been sent to jail by") .. " " .. self_player_name))
else
minetest.chat_send_player(self_player_name, minetest.colorize("red", S("Player sent to jail, but not online")))
end end
else else
minetest.chat_send_player(self_player_name, minetest.colorize("red", S("The player does not exist, check that the nickname is correct"))) minetest.chat_send_player(self_player_name, minetest.colorize("red", S("The player '") .. player_name .. S("' does not exist, check that the nickname is correct")))
end end
end end

View File

@ -28,6 +28,6 @@ Players online=Игроки онлайн
Prisoners=Заключенные Prisoners=Заключенные
To jail=В тюрьму To jail=В тюрьму
To freedom=На свободу To freedom=На свободу
Graphical prisoner management shell=Графическая оболочка управления заключенными Graphical prisoner management shell=Интерфейс управления заключенными
Player sent to jail, but not online=Игрок отправлен в тюрьму, но не в сети The player '=Игрока '
The player does not exist, check that the nickname is correct=Игрока не сущеcтвует, проверьте правильность ника ' does not exist, check that the nickname is correct=' не сущеcтвует, проверьте правильность ника