Replace in message

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

MateoxPL

Active Member
Jan 27, 2018
116
0
0
25
Hello how to replace in message some word for one
example
player type on chat: Text Text Text Text Text Text or Text Message Text

and I want it to change only one word text and the others removed:
> Text message
 
Uhm, maybe this?
Code:
on chat:
    if message contains "text text text text text text ":
        replace all "text text text text text text" with "text" in message
 
Try this:
Code:
on chat:
    set {_l::*} to split message at " "
    loop {_l::*}:
        {_l2::*} does not contain loop-value
        add loop-value to {_l2::*}
    set message to (join {_l2::*} with " ")
 
Status
Not open for further replies.