private bool hasPermission(ReferenceHub player, String requested) { if (requested == "") { return(true); } foreach (Inventory.SyncItemInfo itemInfo in player.GetAllItems()) { if (player.inventory.GetItemByID(itemInfo.id).permissions.Contains(requested)) { return(true); } } return(false); }
private IEnumerator <float> SetMtf(ReferenceHub player) { yield return(Timing.WaitForSeconds(0.5f)); player.SetRole(RoleType.NtfLieutenant); yield return(Timing.WaitForSeconds(0.5f)); foreach (Inventory.SyncItemInfo itemInfo in player.GetAllItems()) { player.RemoveItem(itemInfo); } player.AddItem(ItemType.GunE11SR); player.AddItem(ItemType.GunProject90); player.AddItem(ItemType.GunLogicer); player.AddItem(ItemType.GrenadeFlash); player.AddItem(ItemType.GrenadeFrag); player.AddItem(ItemType.Medkit); player.AddItem(ItemType.GunUSP); player.AddItem(ItemType.KeycardO5); }