Getting info from a player on command?Solved
As this is the first plugin im coding, i have no idea how i am meant to take information from a player, example:
/info <player>, that it will take the playername and the give me information about the guy.
can anybody tell me how to do that?
In response to Quapi ():
As this is the first plugin im coding, i have no idea how i am meant to take information from a play...
You can always look in other plugins to get some additional info how to use some things in C#, Rust and uMod
Thanks
In response to Calytic ():
We have just added documentation detailing the various properties and methods available through IPla...
If i want a "player" to be an argument, how do i do it, as player.Id; is my own id for example if i want to tp to another person. (i know there is a plugin for tp its just an example.)

Edit:
for example /tp <playername>,
that the player.Name; will detect that i mean the second argument (<playername>), i tried some stuff, it just didn't work.
IPlayer player = covalence.Players.FindPlayer ("Name");
IPlayer player = players.Find("Name");


Depends on whether you're using RustPlugin or CovalencePlugin

In response to Calytic ():
IPlayer player = covalence.Players.FindPlayer ("Name");IPlayer player = players.Find("Name");
Edit:
Nevermind i found a fix for it, thanks anyways !:D


I've been trying something, i get this error
i can't understand what's wrong tho
the error:

Failed to call hook 'Cmd1' on plugin 'WarnSystem v0.1.8' (IndexOutOfRangeException: Index was outside the bounds of the array.)
at Oxide.Plugins.WarnSystem.Cmd1 (Oxide.Core.Libraries.Covalence.IPlayer player, System.String cmd, System.String[] args) [0x00052] in <6de7740a3e824fe9bc8ec1ff7b4b3b40>:0
at Oxide.Plugins.WarnSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00063] in <6de7740a3e824fe9bc8ec1ff7b4b3b40>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
In response to Quapi ():
Edit:
Nevermind i found a fix for it, thanks anyways !:D


I've been trying some...
You're trying to use an argument that doesn't exist; should be checking if it exists before using it.
In response to Wulf ():
You're trying to use an argument that doesn't exist; should be checking if it exists before using it...
Yea, i realized it a minute after. Thanks for helping anyways :D
Locked automatically