Team Spartan Cookies & Milk Forums
Owner Faction Members Access - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Owner Faction Members Access (/thread-2438.html)



Owner Faction Members Access - Alanzote - 26-08-2017

Yes, I am back once again.

So, gonna start working on starfall again and I entered in a small problem while trying to make my command chip to work with faction members also. I looked in the starfall docs for a long time and I didnt find anything related to faction members. Is there a function where I can get owners faction information? Like: Name, Player List, Rank and permissions?

Thanks,
Alanzote.


RE: Owner Faction Members Access - Red The Blue Color - 26-08-2017

You can use
Code:
faction.getFactionDetails( faction.getFaction(ply) )
It returns Name,Tag,TagColour,LeaderID,Public


RE: Owner Faction Members Access - Alanzote - 26-08-2017

(26-08-2017, 08:32 PM)Red The Blue Color Wrote: You can use
Code:
faction.getFactionDetails( faction.getFaction(ply) )
It returns Name,Tag,TagColour,LeaderID,Public

Can I get a list of members or thats all?

Nevermind my last question, Thanks Red The Blue Color!


RE: Owner Faction Members Access - Red The Blue Color - 26-08-2017

(26-08-2017, 08:34 PM)Alanzote Wrote:
(26-08-2017, 08:32 PM)Red The Blue Color Wrote: You can use
Code:
faction.getFactionDetails( faction.getFaction(ply) )
It returns Name,Tag,TagColour,LeaderID,Public

Can I get a list of members or thats all?

Nevermind my last question, Thanks Red The Blue Color!

You can get a list of online members with faction.getOnlinePlayers( faction )


RE: Owner Faction Members Access - 4N0NYM - 27-08-2017

here a small example if you need it :
Faction = faction.getFaction(ents.owner())
FactionPlayer = {}
FactionPlayer = faction.getOnlinePlayers(Faction)
for i=1,#FactionPlayer do
if ChatAI.Whitelist[FactionPlayer[i]ConfusedteamID()] ~= true then
if FactionPlayer[i] ~= ents.owner() then
print(FactionPlayer[i]:name())
end
end
end



RE: Owner Faction Members Access - Alanzote - 27-08-2017

I managed to get it working guys, thanks.
P.S.: Could someone lock this thread? I cant find the button...