mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-25 16:53:47 +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"))
|
minetest.chat_send_player(name, S("This faction is not registered"))
|
||||||
else
|
else
|
||||||
local fmembers = ""
|
local fmembers = ""
|
||||||
for play,_ in pairs(facts[faction_name].members) do
|
if table.getn(facts[faction_name].members) > 50 then
|
||||||
if fmembers == "" then
|
fmembers = "The faction has more than 50 members, the members list can't be shown"
|
||||||
fmembers = play
|
elseif
|
||||||
else
|
for play,_ in pairs(facts[faction_name].members) do
|
||||||
fmembers = fmembers..", "..play
|
if fmembers == "" then
|
||||||
|
fmembers = play
|
||||||
|
else
|
||||||
|
fmembers = fmembers..", "..play
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(name, S("Name: @1\nOwner: @2\nMembers: @3", faction_name, factions.get_owner(faction_name), fmembers))
|
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