//Params tryna make my life hard (Documented to the Wiki) void HandleTriggerSend(SDG.Unturned.SteamPlayer player, string name, SDG.Unturned.ESteamCall mode, SDG.Unturned.ESteamPacket type, params object[] arguments) { if (player != null) { goto IL42; } //Calls that come here: // -tellLightingWind // -tellLightingRain return; IL42: { //Player calls will come through here, examples to the Wiki if (name == "askAck") { return; //When the handshake is a lil too much for you to care } if (name == "tellLean") { if (arguments[0] != null) { int L = ((byte)arguments[0] - 1); if (L == 0) { return; } else { Console.WriteLine(player.player.name + " is leaning to the " + (L == -1 ? "Right" : "Left")); } } } } }
public static UnturnedPlayer ToUnturnedPlayer(this SDG.Unturned.SteamPlayer player) { return(UnturnedPlayer.FromSteamPlayer(player)); }