Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
!come command
#11
(02-10-2013, 20:58)8q4s8 Wrote:
(02-10-2013, 20:19)hillbilly Wrote: also it seems even using aaapermissions etc this cmd is open to all.

I changed the code a bit, download is updated.
No idea why this happened

users can still use it Sad(((( and dont works with numbers
Reply

#12
(02-11-2013, 18:30)Dr3am95 Wrote:
(02-10-2013, 20:58)8q4s8 Wrote:
(02-10-2013, 20:19)hillbilly Wrote: also it seems even using aaapermissions etc this cmd is open to all.

I changed the code a bit, download is updated.
No idea why this happened

users can still use it Sad(((( and dont works with numbers

I just tested it and everything is working fine for me, maybe you got a command for users that starts with !come or something like that and !ccome is working too.

here's the code if you want to change the command
CSHARP Code
  1. using System;
  2. using System.Text;
  3. using Addon;
  4.  
  5. namespace ClassLibrary1
  6. {
  7. public class Class1 : CPlugin
  8. {
  9. public override void OnServerLoad()
  10. {
  11. ServerPrint("Teleport_Plugin by 8Q4S8 loaded");
  12. }
  13. public override ChatType OnSay(string Message, ServerClient Client)
  14. {
  15. if (Message.ToLower().StartsWith("!come"))
  16. {
  17. string[] split = Message.Split(' ');
  18. foreach (ServerClient ci in GetClients())
  19. {
  20. if (ci.Name.ToLower().Contains(split[1].ToLower()))
  21. {
  22. ci.OriginX = Client.OriginX;
  23. ci.OriginY = Client.OriginY;
  24. ci.OriginZ = Client.OriginZ;
  25.  
  26. TellClient(Client.ClientNum, "[^1Teleporter^7]: " + ci.Name + " Teleported.", true);
  27. }
  28. }
  29. return ChatType.ChatNone;
  30. }
  31. if (Message.ToLower().StartsWith("!ccome"))
  32. {
  33. string[] split = Message.Split(' ');
  34. foreach (ServerClient ci in GetClients())
  35. {
  36. if (int.Parse(split[1]) == ci.ClientNum)
  37. {
  38. ci.OriginX = Client.OriginX;
  39. ci.OriginY = Client.OriginY;
  40. ci.OriginZ = Client.OriginZ;
  41. TellClient(Client.ClientNum, "[^1Teleporter^7]: " + ci.Name + " Teleported.", true);
  42. }
  43.  
  44. }
  45. return ChatType.ChatNone;
  46. }
  47. return ChatType.ChatContinue;
  48. }
  49.  
  50. }
  51.  
  52. }


inb4 @SgtLegend is making a "better" code with a few lines less
Reply

#13
I now host all my MW3 projects on my private GIT repo
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help auto command Dynasty 6 4,351 08-26-2013, 16:05
Last Post: hillbilly
  whats the command to get string length pedjas 4 3,088 01-20-2013, 18:30
Last Post: pedjas
  [Request] Team change by admin command. Dumas 10 8,877 11-29-2012, 21:38
Last Post: 99IRock
Question Help kick command still need help koro35 3 3,295 11-27-2012, 22:45
Last Post: koro35
  [Help] How to hide a command? korsika 4 4,104 10-27-2012, 23:30
Last Post: korsika
  server command problem anedaktos 3 3,086 08-05-2012, 12:14
Last Post: hillbilly
  [Tutorial] Making command-line application Arteq 9 5,513 04-17-2012, 13:35
Last Post: OrangePL
  [Request] !killall or !respawn all command? choppson 4 2,977 03-10-2012, 20:51
Last Post: JariZ
  [Request] Admin Chat command changing Map and Mod DeMenTor 6 3,948 03-03-2012, 06:52
Last Post: Yurio
  [Release] Read command output JariZ 1 2,259 01-08-2012, 17:29
Last Post: iAegle

Forum Jump:


Users browsing this thread:
1 Guest(s)

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