BasePlayer location and listening for commands?Solved
Reference to type 'BasePlayer' claims it is defined in 'Assembly-CSharp', but it could not be found

What name space is the class BasePlayer in?

and how do i catch player commands?
there are "events" like OnPlayerChat for chat messages but not for commands as far as i can tell?
BasePlayer is in Assembly-CSharp.

OnPlayerCommand and OnServerCommand generally, or OnUserCommand for universal.
"or OnUserCommand for universal." nice it didn't sems to say anything in the documentation about that.

"BasePlayer is in Assembly-CSharp." but visuel studio claims that it cannot find it? should i just ignorre that error then? (i am using Assembly-CSharp opcurse)

also anywhere where there is a bit better and newer documentation? sence https://umod.org/documentation sems to provide really limited infomation?
In response to TactiTac0z ():
"or OnUserCommand for universal." nice it didn't sems to say anything in the documentation about tha...
The universal API is not fully documented, and will be changing soon. As I mentioned, we do not document any game-provided code, only what we provide. BasePlayer is indeed in Assembly-CSharp.dll, so if Visual Studio is telling you that it cannot find it, then the project either isn't setup or the wrong file is being referenced as it is indeed in there and has been in there for the past 3+ years.

You can see what each game provides by getting a decompiler such as JustDecompile, dotPeek, etc. and opening any number of the DLLs from the game such as Assembly-CSharp.dll and looking for the method or object in question; ie. BasePlayer.

thanks for the quick answer Wulf.

say i wanted to create a BasePlayer instance from a IPlayer Interface whould i be able to some thing like:

BasePlayer basePlayer = new BasePlayer(player/*IPlayer type*/);

or does BasePlayer not have a constructor?
(i can't ask visuel studios auto-completsion sence it refusses to understand Assembly-CSharp)

In response to TactiTac0z ():
thanks for the quick answer Wulf.

say i wanted to create a BasePlayer instance from a IPl...
I'm not sure why you'd want to create a new BasePlayer, but you can get the actual BasePlayer for an IPlayer using something such as:

BasePlayer basePlayer = player.Object as BasePlayer;
the most of the "events" use Iplayer and the SendMessage method in the Rust class uses BasePlayer as a argument.
thats why

btw when using the CovalencePlugin what is the best way to get a intance of the Rust class? nvm just creating a new instance by the controtor works just fine
In response to TactiTac0z ():
the most of the "events" use Iplayer and the SendMessage method in the Rust class uses BasePlayer as...
What "Rust" class?
Oxide.Game.Rust.Libraries.Rust

contains stuff as FindPlayer and message methods
In response to TactiTac0z ():
Oxide.Game.Rust.Libraries.Rust

contains stuff as FindPlayer and message methods
There are message sending and player finding methods in the Covalence/Universal API; no need for that class and it is being removed soon as well. 

https://github.com/theumod/uMod/tree/oxide/src/Libraries/Covalence

Examples:

IPlayer player = players.FindPlayer("their name");
server.Broadcast("message here");
player.Message("hello there");
ahhh so depreded that you have forgotten it :D
thanks wolf

Merged post

does IPlayer.Reply and Iplayer.Message do the same?

Merged post

OnUserCommand doesn't seem to work
In response to TactiTac0z ():
ahhh so depreded that you have forgotten it :D
thanks wolf

Merged post

do...
Depreded? Not sure what you mean there.

IPlayer.Reply is an alias for IPlayer.Message, so yes.
deprecated* i was not even close was i xd
Locked automatically