skript - reply + togglepm

Status
This thread has been locked.

hehexddd

Feedback score
0
Posts
18
Reactions
3
Resources
0
hello, I'm trying to make /r (reply) command with togglepm (this function disables other players to private message to specific player).. like msg works fine but im having issues with this.. like i need to somehow specify player's name that I sent him private message and then replace {chat.private.reply.%player%} with it

Code:
command /r [<text>]:
    aliases: /reply
    trigger:
        if {chat.private.reply.%player%} is not set:
            send "&cYou have not messaged a player recently" to player
            stop trigger
        else:
            if arg-1 is not set:
                send "&cPlease specify a message" to player
                stop trigger
            if {chat.private.reply.%player%} is offline:
                send "&c%{chat.private.reply.%player%}% recently went offline" to player
                stop trigger
        if {messages.%arg 1%} is true:
            send "&c{chat.private.reply.%player%} has disabled private messages" to player
            stop trigger
        if {messages.%arg 1%} is false:
            set {chat.private.reply.%player%} to arg-1
            set {chat.private.reply.%arg-1%} to player
            send "&7(To %arg-1%&7) %arg 2%" to player
            send "&7(From %player%&7) %arg 2%" to arg-1
            stop trigger
 
command /togglepm:
    aliases: /tpm
    trigger:
        if {messages.%player%} is not set:
            set {messages.%player%} to false
        if  {messages.%player%} is false:
            set {messages.%player%} to true
            send "&cYou have disabled private messages" to player
            stop
        if {messages.%player%} is true:
            set {messages.%player%} to false
            send "&aYou have enabled private messages" to player
            stop
 
Status
This thread has been locked.
Top