Advertisement
Razerman

Insane Limits (Killme command)

Mar 27th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. string command = player.LastChat;
  2. /* Exit if text is not prefixed with "/", "!", "@", or "?" */
  3. if (!plugin.IsCommand(command))
  4.     return false;
  5.  
  6. command = plugin.ExtractCommand(command);
  7. List<String> words = new List<String>(Regex.Split(command.Trim(), @"\s+"));
  8.  
  9. if (words[0].ToLower().StartsWith("killme"))
  10. {
  11.     plugin.ServerCommand("admin.killPlayer", player.Name);
  12.     return false;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement