Solved Replace string in every 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.

MrNygus

Active Member
Jan 28, 2017
116
2
18
26
I want to replace text in every send command and execute new version.
ex: /op @1 -> /op Nick
Code:
on command:
    if {komenda.%event-commandsender%} is true:
        delete {komenda.%event-commandsender%}
        stop
    if {komenda.%event-commandsender%} is not set:
        cancel event
    set {_c} to the full command
   set {komenda.%event-commandsender%} to true
    if {_c} contains "@":
        if event-commandsender is online:
            replace all "@1" with "%player%" in {_c}
            execute event-commandsender command {_c}
        else:
            execute event-commandsender command {_c}
    else:
        execute event-commandsender command {_c}
OK all works
 
Last edited:
Status
Not open for further replies.