1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Warn others an player ran a command

Discussion in 'Skript' started by EthanCW, Mar 16, 2019.

  1. E

    EthanCW Member

    Joined:
    Mar 16, 2019
    Messages:
    4
    Likes Received:
    0
    Hello, I was wondering if there was a way where if an admin typed something like "//replace grass_block TNT" then it would alert all other admins online "[Admin Name] is using a potentially dangerous command! (command name here)". Or if I was doing a /reload, it would say "Ethan is doing a reload! Stay put until it is finished." Now I know probably a million people have already asked this, but I'm just wondering mainly if skript can access events like that to external commands.
     
  2. Ouma Shu

    Ouma Shu Active Member

    Joined:
    Dec 25, 2017
    Messages:
    25
    Likes Received:
    2
    Code (Text):
    1. on command:
    2.     if command is "/command":
    3.         if player has permission "permission.worldedit":
    4.             if arguments are not set:
    5.                 loop all players:
    6.                     if loop-player has permission "command.alert":
    7.                         send "&c%player% is using a potentially dangerous command! /%command%" to loop-player
    8.             else if arguments are set:
    9.                 loop all players:
    10.                     if loop-player has permission "command.alert":
    11.                         send "&c%player% is using a potentially dangerous command! /%command% %arguments%" to loop-player
    12.  
    13. # and this for the reload
    14.  
    15. command /greload:
    16.     permission: reload.execute
    17.     permission message: &cYou need to be an admin to execute this command!
    18.     trigger:
    19.         broadcast "&7%executor% is doing a reload! Stay put until it is finished."
    20.         wait 2 seconds #you can set how much seconds you want
    21.         make player execute command "/reload"
    Sorry, I made some mistakes, but now it's okay.
     
  3. E

    EthanCW Member

    Joined:
    Mar 16, 2019
    Messages:
    4
    Likes Received:
    0
    Thank you so much!! :emoji_grinning:
     
  4. Ouma Shu

    Ouma Shu Active Member

    Joined:
    Dec 25, 2017
    Messages:
    25
    Likes Received:
    2
    No problem.
     
Loading...