source: binary-improvements/7dtd-server-fixes/src/TelnetCommands/Kill.cs@ 113

Last change on this file since 113 was 113, checked in by alloc, 11 years ago

fixes

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3
4public class Kill : ConsoleCommand
5{
6 public Kill (ConsoleSdtd cons) : base(cons)
7 {
8 }
9
10 public override string Description ()
11 {
12 return "kill a given player (entity id or name)";
13 }
14
15 public override string[] Names ()
16 {
17 return new string[] { "kill", string.Empty };
18 }
19
20 public override void Run (string[] _params)
21 {
22 m_Console.SendResult("Command \"kill\" is currently not implemented!");
23 return;
24 /*
25 try {
26 if (_params.Length != 1) {
27 m_Console.SendResult ("Usage: kill <playername|entityid>");
28 return;
29 }
30
31 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromNameOrID(_params[0], false);
32
33 if (ci == null) {
34 m_Console.SendResult ("Playername or entity id not found.");
35 return;
36 }
37
38 EntityPlayer p = CommonMappingFunctions.GetEntityPlayer(ci);
39 p.Stats.Health.Value = 1;
40 p.Stats.SendAll();
41 m_Console.SendResult ("Killed player " + _params[0]);
42 } catch (Exception e) {
43 Log.Out ("Error in Kill.Run: " + e);
44 }*/
45 }
46}
47
Note: See TracBrowser for help on using the repository browser.