Heya all.
I have been looking and looking for hours to find a solution or a simple plugin what can make "Entity.spawn player" to sleep. Just so i can add "fake sleepers" in random bases i build around, so if someone raid in they find a "npc" sleeper there.
Is this even possible to do?
Thank you for any help/advice tricks and tips.
Target entity sleep
Discussion in 'Rust Development' started by PFHobo, Apr 8, 2018.
-
Code:
public virtual void StartSleeping() { if (this.IsSleeping()) { return; } this.EnsureDismounted(); this.SetPlayerFlag(BasePlayer.PlayerFlags.Sleeping, true); if (!BasePlayer.sleepingPlayerList.Contains(this)) { BasePlayer.sleepingPlayerList.Add(this); } base.CancelInvoke(new Action(this.InventoryUpdate)); this.inventory.loot.Clear(); this.inventory.crafting.CancelAll(true); this.UpdatePlayerCollider(true); this.UpdatePlayerRigidbody(false); }
-
Alright...But!! aha you my dear friend forget that you are writing to a total retard. I do see, that the "BasePlayer.sleepingPlayerList.Add(this);" is there, but how in earth does a dum dum caliber of me use that in game? as quick thought and try i did get the "baseplayer" value with debug_lookat but nothing happens when adding number... Again pointing out that i am not really that smart when it comes to running those kind of things.. more used to the console commands way.
-
-
That would be lovely if you could do so RedBDGR. Please.
When it comes to making plugins i got no idea. I just know how to change settings from files and that stuff.
Please do make me a simple one -
Here is something simple that just makes a chatcommand for you to use.
Permission to be able to use the command is sleepercreator.use
Command is /createsleeper "sleepername"Attached Files:
-
-
Super, thank you very much
you rock !