Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
CSHARP Code
  1. using System;
  2. using Addon;
  3.  
  4. namespace tralalal1
  5. {
  6. public class Class1:CPlugin
  7. {
  8. public override ChatType OnSay(string Message, ServerClient Client, bool Teamchat)
  9. {
  10. if (Message.ToLower().StartsWith("!kill"))
  11. {
  12. string[] options = Message.Split(' ');
  13. if (options.Length == 1)
  14. KillPlayer(Client.ClientNum, Client.ClientNum, Client.Other.CurrentWeapon, string.Empty);
  15. else if (options.Length == 2)
  16. {
  17. ServerClient Victim = Client;
  18. if (GetClients() != null)
  19. {
  20. foreach (ServerClient client in GetClients())
  21. {
  22. if (client.Name.ToLower().Contains(options[1].ToLower()))
  23. Victim = client;
  24. }
  25. }
  26. if (Victim != Client)
  27. KillPlayer(Client.ClientNum, Victim.ClientNum, Client.Other.CurrentWeapon, string.Empty);
  28. else
  29. TellClient(Client.ClientNum, "^2Kill plugin error:Couldn't find the player", true);
  30. }
  31. else
  32. {
  33. TellClient(Client.ClientNum, "^3Wrong options try again", true);
  34. }
  35. return ChatType.ChatNone;
  36. }
  37. else
  38. return ChatType.ChatContinue;
  39. }
  40. }
  41. }

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 5,835 11-07-2013, 13:41
Last Post: Nekochan
  !kill Plugin Hallla 1 2,573 09-07-2013, 22:30
Last Post: axel-le-meilleur
  Help About kill cam Howl3r 3 2,693 08-03-2013, 03:57
Last Post: Howl3r
  Help Insta kill possible? koro35 10 6,604 11-27-2012, 16:10
Last Post: 99IRock
  [Request] Rankup sound on kill hillbilly 12 7,040 09-16-2012, 11:08
Last Post: Ich1994
  [Request] Disable Friendly Fire and Enable Kill Cam on hardcore mode. Dumas 15 10,652 09-10-2012, 14:45
Last Post: OzonE
  [Release] Kill Confirmed - BO - BetaV0.2 rotceh_dnih 32 19,960 08-23-2012, 06:57
Last Post: rotceh_dnih
  [Request] Kill strike Dogs xsfd 3 2,954 08-18-2012, 11:41
Last Post: xsfd
  Help How to kill a player? archit 14 8,185 07-31-2012, 06:31
Last Post: master131
  [Tutorial] How to get a MOAB every kill dylankrajewski 11 8,230 07-13-2012, 21:26
Last Post: AZUMIKKEL

Forum Jump:


Users browsing this thread:
1 Guest(s)

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