mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-21 23:03:55 +01:00
Show list members only if the members are less than 50 in the /factions info command
This commit is contained in:
parent
7d77eb3a41
commit
0b799f3c5f
14
init.lua
14
init.lua
@ -240,11 +240,15 @@ local function handle_command(name, param)
|
||||
minetest.chat_send_player(name, S("This faction is not registered"))
|
||||
else
|
||||
local fmembers = ""
|
||||
for play,_ in pairs(facts[faction_name].members) do
|
||||
if fmembers == "" then
|
||||
fmembers = play
|
||||
else
|
||||
fmembers = fmembers..", "..play
|
||||
if table.getn(facts[faction_name].members) > 50 then
|
||||
fmembers = "The faction has more than 50 members, the members list can't be shown"
|
||||
elseif
|
||||
for play,_ in pairs(facts[faction_name].members) do
|
||||
if fmembers == "" then
|
||||
fmembers = play
|
||||
else
|
||||
fmembers = fmembers..", "..play
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(name, S("Name: @1\nOwner: @2\nMembers: @3", faction_name, factions.get_owner(faction_name), fmembers))
|
||||
|
Loading…
Reference in New Issue
Block a user