Solved a

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

    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.
It works the same way, as your chat script. The only difference between this and that is that you are checking if argument-2 is containing something bad instead of the chat message.

code_language.skript:
options:
    {test::*} = shit, fuck, pussy, cunt, cock sucker or idiot
command /tell [<offline player>] [<text>]:
    usage: send a msg to a player
    trigger:
        if arg 1 is not set:
            send "&cWrong usage. Try again with &b/tell <player> <message>&c."
        if arg 1 is set:
            if arg 2 is not set:
                send "&cWrong usage. Try again with &b/tell <player> <message>&c."
            if arg 1 is online:
                if arg 2 is set:
                    if arg-2 does not contain {test::*}:
                        send "&bTo: &a%arg 1% &f%arg 2%"
                        send "&bFrom: &a%player% &f%arg 2%" to arg 1
                        play "ORB_PICKUP" to arg-1 at volume 1.6
                    else:
                        send "&bWatch your language!"
            else:
                send "&cSorry but &b%arg-1%&c is currently offline."
 
oh... i understand it now!!!
thank you!!
[doublepost=1488220494,1488219976][/doublepost]
update: lol i wrote a simple message to my self (/tell Shadowpeet Hey how are you dfgdf gdfg) (my 2nd acc) and it says watch your language...
[doublepost=1488220764][/doublepost]bump
Should have checked the code before sending.. Here is a fixed and working version.
code_language.skript:
variables: #<-Fixed
    {test::1} = shit
    {test::2} = fuck
    {test::3} = pussy
    {test::4} = cunt
    {test::5} = cock sucker
command /tell [<offline player>] [<text>]:
    usage: send a msg to a player
    trigger:
        if arg 1 is not set:
            send "&cWrong usage. Try again with &b/tell <player> <message>&c."
        if arg 1 is set:
            if arg 2 is not set:
                send "&cWrong usage. Try again with &b/tell <player> <message>&c."
            if arg 1 is online:
                if arg 2 is set:
                    if {test::*} does not contain arg-2: #<- Fixed
                        send "&bTo: &a%arg 1% &f%arg 2%"
                        send "&bFrom: &a%player% &f%arg 2%" to arg 1
                        play "ORB_PICKUP" to arg-1 at volume 1.6
                    else:
                        send "&bWatch your language!"
            else:
                send "&cSorry but &b%arg-1%&c is currently offline."
 
Status
Not open for further replies.