I'm trying to reference each player and teleport them to random spawn points.
No idea how to loop through all of them any help would be appreciated (Newb @ Oxide API and stuff lol.)
Solved Looping through connected players / sleepers? (C#)
Discussion in 'Rust Development' started by ThunderZ, Jun 24, 2016.
-
Wulf Community Admin
Everything there except for the Puts is standard C# and a bit of Rust's own Assembly-CSharp.dll.Code:foreach (var player in BasePlayer.activePlayerList) Puts(player.Name);foreach (var sleeper in BasePlayer.sleepingPlayerList) Puts(sleeper.Name);
-
Thank you.
