Not sure if I'm just not looking in the right place but the documentation only seems to list events, where can I find documentation on the member methods for entites like Player? I'd like to simply give a player various items on respawn but can't find the documented player method for it.
Solved Core entity methods documentation?
Discussion in 'Rust Development' started by FunNFriendly, Feb 20, 2016.
-
This may work.
Code:void OnPlayerRespawned(BasePlayer player) { // Give item to player }
-
I have that already. I'm looking for documentation on the core objects i.e. Player so I can actually peform the action. I already have the documentation for events.
-
Decompile the Assembly-CSharp.dll (which can be found by downloading Oxide for rust). You can do this using a .NET decompiler such as JustDecompile . This will allow you to see how Rust does things. You can also use similar existing plugins for reference.
-
Ah thanks
[DOUBLEPOST=1456035725,1455970742][/DOUBLEPOST]Just in case anyone was wondering this is how I did it:
Code:void OnPlayerRespawned(BasePlayer player) { player.GiveItem(ItemManager.CreateByName("stonehatchet", 1)); player.GiveItem(ItemManager.CreateByName("stone.pickaxe", 1)); player.GiveItem(ItemManager.CreateByName("pistol.revolver", 1)); SendReply(player, "You respawned!"); }