/*▄▄▄ ███▄ ▄███▓ ▄████ ▄▄▄██▀▀▀▓█████▄▄▄█████▓ ▓█████▄ ▓██▒▀█▀ ██▒ ██▒ ▀█▒ ▒██ ▓█ ▀▓ ██▒ ▓▒ ▒██▒ ▄██▓██ ▓██░▒██░▄▄▄░ ░██ ▒███ ▒ ▓██░ ▒░ ▒██░█▀ ▒██ ▒██ ░▓█ ██▓▓██▄██▓ ▒▓█ ▄░ ▓██▓ ░ ░▓█ ▀█▓▒██▒ ░██▒░▒▓███▀▒ ▓███▒ ░▒████▒ ▒██▒ ░ ░▒▓███▀▒░ ▒░ ░ ░ ░▒ ▒ ▒▓▒▒░ ░░ ▒░ ░ ▒ ░░ ▒░▒ ░ ░ ░ ░ ░ ░ ▒ ░▒░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ */ using System.Linq; namespace Oxide.Plugins { [Info("Starter", "bmgjet", "1.0.1")] public class Starter : RustPlugin { public const string One = "Starter.One"; public const string Two = "Starter.Two"; public const string Three = "Starter.Three"; private const string BackpackPerm = "backpacks.size.18"; private void Init() { permission.RegisterPermission(One, this); permission.RegisterPermission(Two, this); permission.RegisterPermission(Three, this); } void OnNewSave() { foreach (var p in permission.GetPermissionUsers(One).ToList()) { permission.RevokeUserPermission(p.Split('(')[0], One); } foreach (var p in permission.GetPermissionUsers(Two).ToList()) { permission.RevokeUserPermission(p.Split('(')[0], Two); } } private void OnPlayerSleepEnded(BasePlayer player) { if (player.userID.IsSteamId()) { if (!permission.UserHasPermission(player.UserIDString, One)) { player.GiveItem(ItemManager.CreateByName("sleepingbag", 1, 3422009359)); //Sleeping Bag permission.GrantUserPermission(player.UserIDString, One, this); return; } else if (!permission.UserHasPermission(player.UserIDString, Two)) { player.GiveItem(ItemManager.CreateByName("rug", 1, 3422011379)); //Rug permission.GrantUserPermission(player.UserIDString, Two, this); return; } else if (!permission.UserHasPermission(player.UserIDString, Three)) { player.GiveItem(ItemManager.CreateByName("bed", 1, 3579355149)); //bed permission.GrantUserPermission(player.UserIDString, Three, this); return; } } } } }