Solved Warn others an player ran a command

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

EthanCW

New Member
Mar 16, 2019
5
0
0
35
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.
 
Code:
on command:
    if command is "/command":
        if player has permission "permission.worldedit":
            if arguments are not set:
                loop all players:
                    if loop-player has permission "command.alert":
                        send "&c%player% is using a potentially dangerous command! /%command%" to loop-player
            else if arguments are set:
                loop all players:
                    if loop-player has permission "command.alert":
                        send "&c%player% is using a potentially dangerous command! /%command% %arguments%" to loop-player

# and this for the reload

command /greload:
    permission: reload.execute
    permission message: &cYou need to be an admin to execute this command!
    trigger:
        broadcast "&7%executor% is doing a reload! Stay put until it is finished."
        wait 2 seconds #you can set how much seconds you want
        make player execute command "/reload"

Sorry, I made some mistakes, but now it's okay.
 
Status
Not open for further replies.