public void Execute(IRocketPlayer caller, string[] command) { UnturnedPlayer player = (UnturnedPlayer)caller; string mode = RandomGun.Config.Mode.ToLower(); if (mode == "raidingguns") { RandomRaidGunSwitch.RaidingEnabled((UnturnedPlayer)caller); return; } if (mode == "op") { RandomOPGunSwitch.OPEnabled((UnturnedPlayer)caller); return; } if (mode == "default") { RandomGunSwitch.GiveRandomGun((UnturnedPlayer)caller); return; } Logger.LogError("Invalid mode specified. \n Current modes: \n default \n raidingguns \n op"); return; }
private IEnumerator StartDelayedUrlRequest(UnturnedPlayer player) { yield return(new WaitForSeconds(1.5f)); if (Config.GiveGunOnJoin) { RandomGunSwitch.GiveRandomGun(player); yield return(new WaitForSeconds(Config.GunOnJoinCooldown)); } }