Advertisement
DoctorX13

XAdvancedBans

Oct 16th, 2019 (edited)
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. //Script Created By Senior S
  2. //You are able to edit it as you pleasure
  3.  
  4. //Translation:
  5. FailPlayer = "Error, please select a player.";
  6. ReasonRDM = "You are banned for RDM";
  7. ReasonAntirol = "You are banned for Antirol";
  8. ReasonMetagaming = "You are banned for Metagaming";
  9. ReasonPowergaming = "You are banned for Powergaming";
  10. OtherBan1 = "Hacks";
  11. OtherBan2 = "Mass Raid";
  12. OtherBan3 = "Bad Language";
  13. OtherBan4 = "Idiot";
  14. ReasonOther1 = "You are banned for Hacks";
  15. ReasonOther2 = "You are banned for Mass Raid";
  16. ReasonOther3 = "You are banned for Bad Language";
  17. ReasonOther4 = "You are banned for Idiot xd";
  18.  
  19. //Arrays: DONT EDIT!!
  20. Target = 0;
  21.  
  22. command xban(arg){
  23. permission = "xban";
  24. execute(){
  25. Target = toPlayer(arg);
  26. if(isPlayer(Target) == true){
  27. effectManager.sendUI(16410, 1, player.id);
  28. }
  29. if(isPlayer(Target) == false){
  30. player.message(FailPlayer);
  31. }
  32. if(arg == null){
  33. player.message(FailPlayer);
  34. }
  35. }
  36. }
  37.  
  38. event onEffectButtonClicked(player, key){
  39. if(key == "Close"){
  40. effectManager.clearUIbyID(16410, player.id);
  41. effectManager.clearUIbyID(16415, player.id);
  42. effectManager.clearUIbyID(16420, player.id);
  43. }
  44. if(key == "RoleplayBans"){
  45. effectManager.clearUIbyID(16410, player.id);
  46. effectManager.sendUI(16420, 3, player.id);
  47. }
  48. if(key == "OtherBans"){
  49. effectManager.clearUIbyID(16410, player.id);
  50. effectManager.sendUI(16415, 2, player.id, OtherBan1, OtherBan2, OtherBan3, OtherBan4);
  51. }
  52. if(key == "RDM"){
  53. server.execute("ban " + Target + " " + ReasonRDM);
  54. }
  55. if(key == "Metagaming"){
  56. server.execute("ban " + Target + " " + ReasonMetagaming);
  57. }
  58. if(key == "Powergaming"){
  59. server.execute("ban " + Target + " " + ReasonPowergaming);
  60. }
  61. if(key == "Antirol"){
  62. server.execute("ban " + Target + " " + ReasonAntirol);
  63. }
  64. if(key == "Other1"){
  65. server.execute("ban " + Target + " " + ReasonOther1);
  66. }
  67. if(key == "Other2"){
  68. server.execute("ban " + Target + " " + ReasonOther2);
  69. }
  70. if(key == "Other3"){
  71. server.execute("ban " + Target + " " + ReasonOther3);
  72. }
  73. if(key == "Other4"){
  74. server.execute("ban " + Target + " " + ReasonOther4);
  75. }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement