Coinage

Enable Checkboxes

Jun 2nd, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. if (str.StartsWith("!enable"))
  2. {
  3.     try
  4. {
  5. string[] split = str.Split(' ');
  6. string checker = split[1].ToLower();
  7. if (checker == "snake")
  8. {
  9.           checkbox.Checked = true;
  10. }
  11. (...) // You can add more checkboxes that can checked.. Make sure it starts with [else if] instead of [if] The brackets aren't part of the code
  12. else
  13. {
  14. }
  15. }
  16. catch
  17. {
  18. con.Send("say", "Format: !enable <checkbox>"); Thread.Sleep(750);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment