How to fix that

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

KAVKAZIE

Active Member
Feb 27, 2017
146
0
16
Hey, How to do that if the arg-1 quit it will clear the replay.
Code:
command /msg [<offlineplayer>] [<text>]:
    aliases: /w, /m, /t, /pm, /tell, /whisper, /message
    trigger:
        if arg 1 is not set:
            send "&cYou must type a specific player."
            stop
        if arg 1 is set:
            if arg 1 is not online:
                send "&c%arg 1% is not online!"
                stop
            if arg 1 is player:
                send "&cYou cannot send a message to yourself!"
                stop
            if arg 2 is not set:
                send "&cYou must type a specific message."
                stop
            if arg 2 is set:
                if {pmblock.%arg-1%} is set:
                    send "&c%arg-1% has his messages disabled."
                    stop
                if {pmblock.%arg-1%} is not set:
                    set {reply.%player%} to arg 1
                    set {reply.%arg 1%} to player
                    send "&7(To %colored prefix of arg-1%%arg 1%&7) %arg 2%"
                    send "&7(From %colored prefix of player%%player%&7) %arg 2%" to arg 1

command /r [<text>]:
    aliases: reply
    trigger:
        if arg 1 is not set:
            send "&cYou must type a specific message."
            stop
        if arg 1 is set:
            if {reply.%player%} is not set:
                send "&cSorry but you do not have any correspondent!"
                stop
            if {reply.%player%} is not online:
                send "&c%{reply.%player%}% is not online!"
                stop
            if {pmblock.%{reply.%player%}%} is set:
                send "&c%{reply.%player%}% has his messages disabled."
                stop
            if {reply.%player%} is set:
                if {reply.%player%} is online:
                    set {reply.%{reply.%player%}%} to player
                    send "&7(To %colored prefix of {reply.%player%}%%{reply.%player%}%&7) %arg 1%"
                    send "&7(From %colored prefix of player%%player%&7) %arg 1%" to {reply.%player%}
                else:
                    send "&c%{reply.%player%}% is not online!"
                    stop
[doublepost=1553993770,1553966581][/doublepost]up
 
try this
scroll down
Hey, How to do that if the arg-1 quit it will clear the replay.
Code:
command /msg [<offlineplayer>] [<text>]:
    aliases: /w, /m, /t, /pm, /tell, /whisper, /message
    trigger:
        if arg 1 is not set:
            send "&cYou must type a specific player."
            stop
        if arg 1 is set:
            if arg 1 is not online:
                send "&c%arg 1% is not online!"
                stop
            if arg 1 is player:
                send "&cYou cannot send a message to yourself!"
                stop
            if arg 2 is not set:
                send "&cYou must type a specific message."
                stop
            if arg 2 is set:
                if {pmblock.%arg-1%} is set:
                    send "&c%arg-1% has his messages disabled."
                    stop
                if {pmblock.%arg-1%} is not set:
                    set {reply.%player%} to arg 1
                    set {reply.%arg 1%} to player
                    send "&7(To %colored prefix of arg-1%%arg 1%&7) %arg 2%"
                    send "&7(From %colored prefix of player%%player%&7) %arg 2%" to arg 1

command /r [<text>]:
    aliases: reply
    trigger:
        if arg 1 is not set:
            send "&cYou must type a specific message."
            stop
        if arg 1 is set:
            if {reply.%player%} is not set:
                send "&cSorry but you do not have any correspondent!"
                stop
            if {reply.%player%} is not online:
                send "&c%{reply.%player%}% is not online!"
                stop
            if {pmblock.%{reply.%player%}%} is set:
                send "&c%{reply.%player%}% has his messages disabled."
                stop
            if {reply.%player%} is set:
                if {reply.%player%} is online:
                    set {reply.%{reply.%player%}%} to player
                    send "&7(To %colored prefix of {reply.%player%}%%{reply.%player%}%&7) %arg 1%"
                    send "&7(From %colored prefix of player%%player%&7) %arg 1%" to {reply.%player%}
                else:
                    send "&c%{reply.%player%}% is not online!"

on quit:
    if {reply.%player%} is set:
        clear {reply.%{reply.%player%}%}
        clear {reply.%player%}
                    stop
[doublepost=1553993770,1553966581][/doublepost]up
 
  • Like
Reactions: KAVKAZIE
Status
Not open for further replies.