// Token: 0x06001DC9 RID: 7625 RVA: 0x000A0C24 File Offset: 0x0009F024 protected override void execute(CSteamID executorID, string parameter) { if (!LevelManager.hasAirdrop) { return; } LevelManager.airdropFrequency = 0u; CommandWindow.Log(this.localization.format("AirdropText")); }
// Token: 0x06001E1F RID: 7711 RVA: 0x000A42E0 File Offset: 0x000A26E0 protected override void execute(CSteamID executorID, string parameter) { if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } if (!Provider.hasCheats) { CommandWindow.LogError(this.localization.format("CheatsErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length < 1 || componentsFromSerial.Length > 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } bool flag = false; SteamPlayer steamPlayer; if (!PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer)) { steamPlayer = PlayerTool.getSteamPlayer(executorID); if (steamPlayer == null) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } flag = true; } int num; if (!int.TryParse(componentsFromSerial[(!flag) ? 1 : 0], out num)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[(!flag) ? 1 : 0] })); return; } steamPlayer.player.skills.askRep(num); string text = num.ToString(); if (num > 0) { text = '+' + text; } CommandWindow.Log(this.localization.format("ReputationText", new object[] { steamPlayer.playerID.playerName, text })); }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 1 && componentsFromSerial.Length != 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } SteamPlayer steamPlayer; if (!PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer)) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } P2PSessionState_t p2PSessionState_t; uint ip; if (SteamGameServerNetworking.GetP2PSessionState(steamPlayer.playerID.steamID, ref p2PSessionState_t)) { ip = p2PSessionState_t.m_nRemoteIP; } else { ip = 0u; } if (componentsFromSerial.Length == 1) { SteamBlacklist.ban(steamPlayer.playerID.steamID, ip, executorID, this.localization.format("SlayTextReason"), SteamBlacklist.PERMANENT); } else if (componentsFromSerial.Length == 2) { SteamBlacklist.ban(steamPlayer.playerID.steamID, ip, executorID, componentsFromSerial[1], SteamBlacklist.PERMANENT); } if (steamPlayer.player != null) { EPlayerKill eplayerKill; steamPlayer.player.life.askDamage(101, Vector3.up * 101f, EDeathCause.KILL, ELimb.SKULL, executorID, out eplayerKill); } CommandWindow.Log(this.localization.format("SlayText", new object[] { steamPlayer.playerID.playerName })); }
protected override void execute(CSteamID executorID, string parameter) { if (parameter == string.Empty) { if (!Dedicator.isDedicated) { return; } CommandWindow.Log(this.localization.format("HelpText")); string text = string.Empty; for (int i = 0; i < Commander.commands.Count; i++) { text += Commander.commands[i].info; if (i < Commander.commands.Count - 1) { text += "\n"; } } CommandWindow.Log(text); } else { for (int j = 0; j < Commander.commands.Count; j++) { if (parameter.ToLower() == Commander.commands[j].command.ToLower()) { if (executorID == CSteamID.Nil) { CommandWindow.Log(Commander.commands[j].info); CommandWindow.Log(Commander.commands[j].help); } else { ChatManager.say(executorID, Commander.commands[j].info, Palette.SERVER, EChatMode.SAY); ChatManager.say(executorID, Commander.commands[j].help, Palette.SERVER, EChatMode.SAY); } return; } } if (executorID == CSteamID.Nil) { CommandWindow.Log(this.localization.format("NoCommandErrorText", new object[] { parameter })); } else { ChatManager.say(executorID, this.localization.format("NoCommandErrorText", new object[] { parameter }), Palette.SERVER, EChatMode.SAY); } } }
// Token: 0x06001E42 RID: 7746 RVA: 0x000A5B5C File Offset: 0x000A3F5C protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 1 && componentsFromSerial.Length != 4) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } ChatManager.welcomeText = componentsFromSerial[0]; if (componentsFromSerial.Length == 1) { ChatManager.welcomeColor = Palette.SERVER; } else if (componentsFromSerial.Length == 4) { byte b; if (!byte.TryParse(componentsFromSerial[1], out b)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[0] })); return; } byte b2; if (!byte.TryParse(componentsFromSerial[2], out b2)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[1] })); return; } byte b3; if (!byte.TryParse(componentsFromSerial[3], out b3)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[2] })); return; } ChatManager.welcomeColor = new Color((float)b / 255f, (float)b2 / 255f, (float)b3 / 255f); } CommandWindow.Log(this.localization.format("WelcomeText", new object[] { componentsFromSerial[0] })); }
protected override void execute(CSteamID executorID, string parameter) { if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } if (!Provider.hasCheats) { CommandWindow.LogError(this.localization.format("CheatsErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length < 1 || componentsFromSerial.Length > 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } bool flag = false; SteamPlayer steamPlayer; if (!PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer)) { steamPlayer = PlayerTool.getSteamPlayer(executorID); if (steamPlayer == null) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } flag = true; } ushort num; if (!ushort.TryParse(componentsFromSerial[(!flag) ? 1 : 0], out num)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[(!flag) ? 1 : 0] })); return; } steamPlayer.player.quests.sendAddQuest(num); CommandWindow.Log(this.localization.format("QuestText", new object[] { steamPlayer.playerID.playerName, num })); }
// Token: 0x06001E16 RID: 7702 RVA: 0x000A3C8C File Offset: 0x000A208C protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } Provider.isPvP = false; CommandWindow.Log(this.localization.format("PvEText")); }
// Token: 0x06001E2D RID: 7725 RVA: 0x000A4B48 File Offset: 0x000A2F48 protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } PlayerSavedata.hasSync = true; CommandWindow.Log(this.localization.format("SyncText")); }
// Token: 0x06003A36 RID: 14902 RVA: 0x001BE008 File Offset: 0x001BC408 public static void log(byte[] hash) { if (hash == null || hash.Length != 20) { return; } string text = string.Empty; for (int i = 0; i < hash.Length; i++) { text += hash[i].ToString("X"); } CommandWindow.Log(text); }
// Token: 0x06001E1D RID: 7709 RVA: 0x000A417C File Offset: 0x000A257C protected override void execute(CSteamID executorID, string parameter) { string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 4) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } float num; if (!float.TryParse(componentsFromSerial[0], out num)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } float num2; if (!float.TryParse(componentsFromSerial[1], out num2)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } float num3; if (!float.TryParse(componentsFromSerial[2], out num3)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } float num4; if (!float.TryParse(componentsFromSerial[3], out num4)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } CommandWindow.Log(this.localization.format("RainText")); }
// Token: 0x060027DA RID: 10202 RVA: 0x000F19BC File Offset: 0x000EFDBC private void Update() { if (ChatManager.isVoting && (Time.realtimeSinceStartup - ChatManager.lastVote > ChatManager.voteDuration || ChatManager.voteYes >= ChatManager.votesNeeded || ChatManager.voteNo > ChatManager.votesPossible - ChatManager.votesNeeded)) { ChatManager.isVoting = false; if (ChatManager.voteYes >= ChatManager.votesNeeded) { if (ChatManager.voteOrigin != null) { ChatManager.voteOrigin.nextVote = Time.realtimeSinceStartup + ChatManager.votePassCooldown; } CommandWindow.Log(Provider.localization.format("Vote_Pass")); ChatManager.manager.channel.send("tellVoteStop", ESteamCall.CLIENTS, ESteamPacket.UPDATE_RELIABLE_BUFFER, new object[] { 3 }); SteamBlacklist.ban(ChatManager.voteTarget, ChatManager.voteIP, CSteamID.Nil, "you were vote kicked", SteamBlacklist.TEMPORARY); } else { if (ChatManager.voteOrigin != null) { ChatManager.voteOrigin.nextVote = Time.realtimeSinceStartup + ChatManager.voteFailCooldown; } CommandWindow.Log(Provider.localization.format("Vote_Fail")); ChatManager.manager.channel.send("tellVoteStop", ESteamCall.CLIENTS, ESteamPacket.UPDATE_RELIABLE_BUFFER, new object[] { 4 }); } } if (ChatManager.needsVote && !ChatManager.hasVote) { if (Input.GetKeyDown(KeyCode.F1)) { ChatManager.needsVote = false; ChatManager.hasVote = true; ChatManager.sendVote(true); } else if (Input.GetKeyDown(KeyCode.F2)) { ChatManager.needsVote = false; ChatManager.hasVote = true; ChatManager.sendVote(false); } } }
public static void installNextItem() { if (DedicatedUGC.installing.Count == 0) { DedicatedUGC.triggerInstalled(); } else { CommandWindow.Log("Downloading workshop item: " + DedicatedUGC.installing[0]); if (!SteamGameServerUGC.DownloadItem((PublishedFileId_t)DedicatedUGC.installing[0], true)) { DedicatedUGC.installing.RemoveAt(0); CommandWindow.Log("Unable to download item!"); DedicatedUGC.installNextItem(); } } }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } Provider.selectedGameModeName = parameter; CommandWindow.Log(this.localization.format("GameModeText", new object[] { parameter })); }
// Token: 0x06001DFE RID: 7678 RVA: 0x000A2FDC File Offset: 0x000A13DC protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } byte b; if (!byte.TryParse(parameter, out b)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } if (b < CommandMaxPlayers.MIN_NUMBER) { CommandWindow.LogError(this.localization.format("MinNumberErrorText", new object[] { CommandMaxPlayers.MIN_NUMBER })); return; } if (b > CommandMaxPlayers.MAX_NUMBER) { CommandWindow.LogError(this.localization.format("MaxNumberErrorText", new object[] { CommandMaxPlayers.MAX_NUMBER })); return; } if (b > CommandMaxPlayers.MAX_NUMBER / 2) { CommandWindow.LogWarning(this.localization.format("RecommendedNumberErrorText", new object[] { (int)(CommandMaxPlayers.MAX_NUMBER / 2) })); } Provider.maxPlayers = b; CommandWindow.Log(this.localization.format("MaxPlayersText", new object[] { b })); }
// Token: 0x06001DF8 RID: 7672 RVA: 0x000A2B38 File Offset: 0x000A0F38 protected override void execute(CSteamID executorID, string parameter) { string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length < 1) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } byte b; if (!byte.TryParse(componentsFromSerial[0], out b) || (b != 255 && b > 10)) { CommandWindow.LogError(this.localization.format("InvalidSkillsetIDErrorText", new object[] { componentsFromSerial[0] })); return; } ushort[] array = new ushort[componentsFromSerial.Length - 1]; for (int i = 1; i < componentsFromSerial.Length; i++) { ushort num; if (!ushort.TryParse(componentsFromSerial[i], out num)) { CommandWindow.LogError(this.localization.format("InvalidItemIDErrorText", new object[] { componentsFromSerial[i] })); return; } array[i - 1] = num; } if (b == 255) { PlayerInventory.loadout = array; } else { PlayerInventory.skillsets[(int)b] = array; } CommandWindow.Log(this.localization.format("LoadoutText", new object[] { b })); }
// Token: 0x06001DD5 RID: 7637 RVA: 0x000A13E8 File Offset: 0x0009F7E8 protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } string text = parameter.ToLower(); ECameraMode cameraMode; if (text == this.localization.format("CameraFirst").ToLower()) { cameraMode = ECameraMode.FIRST; } else if (text == this.localization.format("CameraThird").ToLower()) { cameraMode = ECameraMode.THIRD; } else if (text == this.localization.format("CameraBoth").ToLower()) { cameraMode = ECameraMode.BOTH; } else { if (!(text == this.localization.format("CameraVehicle").ToLower())) { CommandWindow.LogError(this.localization.format("NoCameraErrorText", new object[] { text })); return; } cameraMode = ECameraMode.VEHICLE; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } Provider.cameraMode = cameraMode; CommandWindow.Log(this.localization.format("CameraText", new object[] { text })); }
public static void updateProgress(float progress) { if (!Dedicator.isDedicated) { if (LoadingUI.loadingImage == null) { return; } LoadingUI.loadingImage.sizeScale_X = progress; LoadingUI.loadingImage.sizeOffset_X = (int)(-20f * progress); } else { CommandWindow.Log(LoadingUI.localization.format("Level_Load", new object[] { (int)(progress * 100f) })); } }
// Token: 0x06001E08 RID: 7688 RVA: 0x000A3530 File Offset: 0x000A1930 protected override void execute(CSteamID executorID, string parameter) { if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } if (Provider.isServer && Level.info.type == ELevelType.HORDE) { CommandWindow.LogError(this.localization.format("HordeErrorText")); return; } if (Provider.isServer && Level.info.type == ELevelType.ARENA) { CommandWindow.LogError(this.localization.format("ArenaErrorText")); return; } LightingManager.time = (uint)(LightingManager.cycle * (LevelLighting.bias + LevelLighting.transition)); CommandWindow.Log(this.localization.format("NightText")); }
// Token: 0x06001E33 RID: 7731 RVA: 0x000A512C File Offset: 0x000A352C protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } ushort num; if (!ushort.TryParse(parameter, out num)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } if (num < CommandTimeout.MIN_NUMBER) { CommandWindow.LogError(this.localization.format("MinNumberErrorText", new object[] { CommandTimeout.MIN_NUMBER })); return; } if (num > CommandTimeout.MAX_NUMBER) { CommandWindow.LogError(this.localization.format("MaxNumberErrorText", new object[] { CommandTimeout.MAX_NUMBER })); return; } if (Provider.configData != null) { Provider.configData.Server.Max_Ping_Milliseconds = (uint)num; } CommandWindow.Log(this.localization.format("TimeoutText", new object[] { num })); }
public static void updateKey(string key) { if (!Dedicator.isDedicated) { if (LoadingUI.loadingLabel == null) { return; } LoadingUI.loadingLabel.text = LoadingUI.localization.format(key); if (LoadingUI.loadingImage == null) { return; } LoadingUI.loadingImage.sizeScale_X = 1f; LoadingUI.loadingImage.sizeOffset_X = -20; } else { CommandWindow.Log(LoadingUI.localization.format(key)); } }
// Token: 0x06001DF4 RID: 7668 RVA: 0x000A28B4 File Offset: 0x000A0CB4 protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 1 && componentsFromSerial.Length != 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } SteamPlayer steamPlayer; if (!PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer)) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } if (componentsFromSerial.Length == 1) { Provider.kick(steamPlayer.playerID.steamID, this.localization.format("KickTextReason")); } else if (componentsFromSerial.Length == 2) { Provider.kick(steamPlayer.playerID.steamID, componentsFromSerial[1]); } CommandWindow.Log(this.localization.format("KickText", new object[] { steamPlayer.playerID.playerName })); }
// Token: 0x06001E01 RID: 7681 RVA: 0x000A3158 File Offset: 0x000A1558 protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } string text = parameter.ToLower(); EGameMode mode; if (text == this.localization.format("ModeEasy").ToLower()) { mode = EGameMode.EASY; } else if (text == this.localization.format("ModeNormal").ToLower()) { mode = EGameMode.NORMAL; } else { if (!(text == this.localization.format("ModeHard").ToLower())) { CommandWindow.LogError(this.localization.format("NoModeErrorText", new object[] { text })); return; } mode = EGameMode.HARD; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } Provider.mode = mode; CommandWindow.Log(this.localization.format("ModeText", new object[] { text })); }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } float num; if (!float.TryParse(parameter, out num)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { parameter })); return; } if (num < CommandChatrate.MIN_NUMBER) { CommandWindow.LogError(this.localization.format("MinNumberErrorText", new object[] { CommandChatrate.MIN_NUMBER })); return; } if (num > CommandChatrate.MAX_NUMBER) { CommandWindow.LogError(this.localization.format("MaxNumberErrorText", new object[] { CommandChatrate.MAX_NUMBER })); return; } ChatManager.chatrate = num; CommandWindow.Log(this.localization.format("ChatrateText", new object[] { num })); }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (Provider.isServer) { CommandWindow.LogError(this.localization.format("RunningErrorText")); return; } if (parameter.Length == 0) { Provider.serverPassword = string.Empty; CommandWindow.Log(this.localization.format("DisableText")); return; } Provider.serverPassword = parameter; CommandWindow.Log(this.localization.format("PasswordText", new object[] { parameter })); }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (Provider.clients.Count == 0) { CommandWindow.LogError(this.localization.format("NoPlayersErrorText")); return; } CommandWindow.Log(this.localization.format("PlayersText")); for (int i = 0; i < Provider.clients.Count; i++) { SteamPlayer steamPlayer = Provider.clients[i]; CommandWindow.Log(this.localization.format("PlayerIDText", new object[] { steamPlayer.playerID.steamID, steamPlayer.playerID.playerName, steamPlayer.playerID.characterName, (int)(steamPlayer.ping * 1000f) })); } }
public static void assetsScan(string key, int count) { LoadingUI.assetsScanCount = count; if (!Dedicator.isDedicated) { if (LoadingUI.loadingLabel == null) { return; } LoadingUI.loadingLabel.text = LoadingUI.localization.format("Assets_Scan", new object[] { LoadingUI.localization.format(key), LoadingUI.assetsScanCount }); } else { CommandWindow.Log(LoadingUI.localization.format("Assets_Scan", new object[] { LoadingUI.localization.format(key), LoadingUI.assetsScanCount })); } }
protected override void execute(CSteamID executorID, string parameter) { if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length < 1 || componentsFromSerial.Length > 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } bool flag = componentsFromSerial.Length == 1; SteamPlayer steamPlayer; if (flag) { steamPlayer = PlayerTool.getSteamPlayer(executorID); } else { PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer); } if (steamPlayer == null) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } if (steamPlayer.player.movement.getVehicle() != null) { CommandWindow.LogError(this.localization.format("NoVehicleErrorText")); return; } SteamPlayer steamPlayer2; if (PlayerTool.tryGetSteamPlayer(componentsFromSerial[(!flag) ? 1 : 0], out steamPlayer2)) { steamPlayer.player.sendTeleport(steamPlayer2.player.transform.position, MeasurementTool.angleToByte(steamPlayer2.player.transform.rotation.eulerAngles.y)); CommandWindow.Log(this.localization.format("TeleportText", new object[] { steamPlayer.playerID.playerName, steamPlayer2.playerID.playerName })); } else { Node node = null; for (int i = 0; i < LevelNodes.nodes.Count; i++) { if (LevelNodes.nodes[i].type == ENodeType.LOCATION && NameTool.checkNames(componentsFromSerial[(!flag) ? 1 : 0], ((LocationNode)LevelNodes.nodes[i]).name)) { node = LevelNodes.nodes[i]; break; } } if (node != null) { steamPlayer.player.sendTeleport(node.point, MeasurementTool.angleToByte(steamPlayer.player.transform.rotation.eulerAngles.y)); CommandWindow.Log(this.localization.format("TeleportText", new object[] { steamPlayer.playerID.playerName, ((LocationNode)node).name })); } else { CommandWindow.LogError(this.localization.format("NoLocationErrorText", new object[] { componentsFromSerial[(!flag) ? 1 : 0] })); } } }
protected override void execute(CSteamID executorID, string parameter) { if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } if (!Provider.hasCheats) { CommandWindow.LogError(this.localization.format("CheatsErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length < 1 || componentsFromSerial.Length > 3) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } bool flag = false; SteamPlayer steamPlayer; if (!PlayerTool.tryGetSteamPlayer(componentsFromSerial[0], out steamPlayer)) { steamPlayer = PlayerTool.getSteamPlayer(executorID); if (steamPlayer == null) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { componentsFromSerial[0] })); return; } flag = true; } ushort num; if (!ushort.TryParse(componentsFromSerial[(!flag) ? 1 : 0], out num)) { CommandWindow.LogError(this.localization.format("InvalidItemIDErrorText", new object[] { componentsFromSerial[(!flag) ? 1 : 0] })); return; } byte b = 1; if (flag) { if (componentsFromSerial.Length > 1 && !byte.TryParse(componentsFromSerial[1], out b)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[1] })); return; } } else if (componentsFromSerial.Length > 2 && !byte.TryParse(componentsFromSerial[2], out b)) { CommandWindow.LogError(this.localization.format("InvalidNumberErrorText", new object[] { componentsFromSerial[2] })); return; } if (!ItemTool.tryForceGiveItem(steamPlayer.player, num, b)) { CommandWindow.LogError(this.localization.format("NoItemIDErrorText", new object[] { num })); return; } CommandWindow.Log(this.localization.format("GiveText", new object[] { steamPlayer.playerID.playerName, num, b })); }
// Token: 0x06001DFA RID: 7674 RVA: 0x000A2CA8 File Offset: 0x000A10A8 protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 4) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } bool shouldLogChat; if (componentsFromSerial[0].ToLower() == "y") { shouldLogChat = true; } else { if (!(componentsFromSerial[0].ToLower() == "n")) { CommandWindow.LogError(this.localization.format("InvalidBooleanErrorText", new object[] { componentsFromSerial[0] })); return; } shouldLogChat = false; } bool shouldLogJoinLeave; if (componentsFromSerial[1].ToLower() == "y") { shouldLogJoinLeave = true; } else { if (!(componentsFromSerial[1].ToLower() == "n")) { CommandWindow.LogError(this.localization.format("InvalidBooleanErrorText", new object[] { componentsFromSerial[1] })); return; } shouldLogJoinLeave = false; } bool shouldLogDeaths; if (componentsFromSerial[2].ToLower() == "y") { shouldLogDeaths = true; } else { if (!(componentsFromSerial[2].ToLower() == "n")) { CommandWindow.LogError(this.localization.format("InvalidBooleanErrorText", new object[] { componentsFromSerial[2] })); return; } shouldLogDeaths = false; } bool shouldLogAnticheat; if (componentsFromSerial[3].ToLower() == "y") { shouldLogAnticheat = true; } else { if (!(componentsFromSerial[3].ToLower() == "n")) { CommandWindow.LogError(this.localization.format("InvalidBooleanErrorText", new object[] { componentsFromSerial[3] })); return; } shouldLogAnticheat = false; } CommandWindow.shouldLogChat = shouldLogChat; CommandWindow.shouldLogJoinLeave = shouldLogJoinLeave; CommandWindow.shouldLogDeaths = shouldLogDeaths; CommandWindow.shouldLogAnticheat = shouldLogAnticheat; CommandWindow.Log(this.localization.format("LogText")); }
protected override void execute(CSteamID executorID, string parameter) { Provider.resetConfig(); CommandWindow.Log(this.localization.format("ResetConfigText")); }