Request !kill
#1
just a command that kills the player like !kill playername ?
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#2
easy
Code:
using System; using Addon; namespace tralalal1 { public class Class1:CPlugin { public override ChatType OnSay(string Message, ServerClient Client, bool Teamchat) { if (Message.ToLower().StartsWith("!kill")) { string[] options = Message.Split(' '); if (options.Length == 1) KillPlayer(Client.ClientNum, Client.ClientNum, Client.Other.CurrentWeapon, string.Empty); else if (options.Length == 2) { ServerClient Victim = Client; if (GetClients() != null) { foreach (ServerClient client in GetClients()) { if (client.Name.ToLower().Contains(options[1].ToLower())) Victim = client; } } if (Victim != Client) KillPlayer(Client.ClientNum, Victim.ClientNum, Client.Other.CurrentWeapon, string.Empty); else TellClient(Client.ClientNum, "^2Kill plugin error:Couldn't find the player", true); } else { TellClient(Client.ClientNum, "^3Wrong options try again", true); } return ChatType.ChatNone; } else return ChatType.ChatContinue; } } }
If no player name is given kills the caller itself
Reply

#3
why not suicide player? its much easier.
Reply

#4
(09-20-2012, 06:22)OzonE Wrote: why not suicide player? its much easier.

anyway to do this so it doesn't show as playername killed playername ??
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#5
There's a killplayer function now? Sweet!
Reply

#6
just found out, this command is available to all users, even though it says permission denied etc they can still use it
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#7
i added the same thing in GP , but im using suicide player. all you need is client num.
Reply

#8
the similar thing is now added to God Plugin 4.0.1.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Sentry Gun kill = Player kill Snake 8 8,238 11-07-2013, 13:41
Last Post: Nekochan
  !kill Plugin Hallla 1 3,498 09-07-2013, 22:30
Last Post: axel-le-meilleur
  Help About kill cam Howl3r 3 3,856 08-03-2013, 03:57
Last Post: Howl3r
  Help Insta kill possible? koro35 10 9,290 11-27-2012, 16:10
Last Post: 99IRock
  [Request] Rankup sound on kill hillbilly 12 9,720 09-16-2012, 11:08
Last Post: Ich1994
  [Request] Disable Friendly Fire and Enable Kill Cam on hardcore mode. Dumas 15 14,202 09-10-2012, 14:45
Last Post: OzonE
  [Release] Kill Confirmed - BO - BetaV0.2 rotceh_dnih 32 27,015 08-23-2012, 06:57
Last Post: rotceh_dnih
  [Request] Kill strike Dogs xsfd 3 4,020 08-18-2012, 11:41
Last Post: xsfd
  Help How to kill a player? archit 14 11,819 07-31-2012, 06:31
Last Post: master131
  [Tutorial] How to get a MOAB every kill dylankrajewski 11 11,009 07-13-2012, 21:26
Last Post: AZUMIKKEL

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.