Creating a team and inviting players?
Sparta
How would someone go about creating a team in Rust by force and then choosing the leader and who to invite?
misticos
Plugin Developer
Reviewer
Editor
Hello. Please, clarify what is your question.
Sparta
Original Poster
5b6ed4c9ac8e4.jpg misticos
Hello. Please, clarify what is your question.

I think my question was what I wanted it to be, but I'll try being more specific.

How can I make it so say, I have a command that is called createteam, how would I make it so it creates a new team with the command executor as the leader of the team then add players to that team with another command?

2CHEVSKII
Plugin Developer
Take a look at RelationshipManager class
Sparta
Original Poster
5ba0b9633e817.png?uid=5ba0b9716c220 2CHEVSKII
Take a look at RelationshipManager class

I did and there aren't really any methods aside from ones that take in a ConsoleSystem.Arg as an argument and there is no documentation related to it. RelationshipManager.PlayerTeam has no options really that would help me either.

Merged post

I figured it out. I realized you just make a new RelationshipManager.PlayerTeam and will find out how to set someone's team sooner or later.

Thanks for the pointers.

Merged post

Hello, I still need help. Is there a way to get a player's team (RelationshipManager.PlayerTeam) based on their currentTeam (which is a ulong)? There seems to be no methods like RelationshipManager.GetTeam(teamID). 
Ultra
Plugin Developer
Sparta

I did and there aren't really any methods aside from ones that take in a ConsoleSystem.Arg as an argument and there is no documentation related to it. RelationshipManager.PlayerTeam has no options really that would help me either.

Merged post

I figured it out. I realized you just make a new RelationshipManager.PlayerTeam and will find out how to set someone's team sooner or later.

Thanks for the pointers.

Merged post

Hello, I still need help. Is there a way to get a player's team (RelationshipManager.PlayerTeam) based on their currentTeam (which is a ulong)? There seems to be no methods like RelationshipManager.GetTeam(teamID). 

use the dictionary:
RelationshipManager.PlayerTeam pt = rm.playerTeams[101];

Sparta
Original Poster
5d2e4d835505b.png Ultra

use the dictionary:
RelationshipManager.PlayerTeam pt = rm.playerTeams[101];

Thanks.

misticos
Plugin Developer
Reviewer
Editor
public global::RelationshipManager.PlayerTeam FindTeam(ulong TeamID) :)
Sparta
Original Poster
5b6ed4c9ac8e4.jpg misticos
public global::RelationshipManager.PlayerTeam FindTeam(ulong TeamID) :)

That method is not accessible in RelationshipManager or PlayerTeam, where did you find this?

misticos
Plugin Developer
Reviewer
Editor
It is in RelationshipManager, (make sure you use the instance, not like static method!)
Sparta
Original Poster
5b6ed4c9ac8e4.jpg misticos
It is in RelationshipManager, (make sure you use the instance, not like static method!)

Where would I get the instance of it? I wish the API documents stated something about that, thanks for letting me know btw. I'm assuming it would be plugin.getRelationshipManager or something along the lines of that?

 

misticos
Plugin Developer
Reviewer
Editor
It's not uMod, so not plugin. RelationshipManager.Instance. Try using dnSpy
Sparta
Original Poster
5b6ed4c9ac8e4.jpg misticos
It's not uMod, so not plugin. RelationshipManager.Instance. Try using dnSpy

Thanks a bunch. I was confused because RelationshipManager is the only manager I know of that is not a static manager (or has static methods).

Although this may not be relevant to the topic, do you know how I would go about creating my own zones/areas that players can or cannot enter? I believe Oxide had a ZoneManager but I don't think uMod has one.

misticos
Plugin Developer
Reviewer
Editor
We have Zone Manager on uMod too. https://umod.org/plugins/zone-manager