Vanish system

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

Ardno

Member
Mar 11, 2019
38
0
0
24
Hi,

I'm making a vanish system, but I don't know, how complete this "part". If player has permission trenend.vanish.visit and send message with name of vanish player(s), I want to cancel this message and send message to player(which send a message) with "error" message. I was made with variable {v::*}

Code:
on chat:
    if player has permission "trenend.vanish.visit":
        if message contains "%{v::*}%":
            cancel event
            message "Useful message xd" to player
This code is correct, but not working(code) if vanished players are 2 and greater number(of vanished players). I try with loop, but the code is with errors.

How I make cancel message with names of vanished players? In code:

Code:
 ...code-I don't want to show it :D....
                if {vanish::%player%::active} is not set:
                    loop all players:
                        loop-player doesn't have permission "trenend.vanish.visit":
                            hide player from loop-player
                    set {vanish::%player%::active} to true
                    add player to {v::*}
                    delete {vanish::%player%::pvp}
                    delete {vanish::%player%::drop}
                    delete {vanish::%player%::pickup}
                    delete {vanish::%player%::break}
                    delete {vanish::%player%::build}
                    message "Vanished" to player
                else:
                    reveal player from all players
                    delete {vanish::%player%::active}
                    remove player from {v::*}
                    message "Unvanished" to player

Sorry for my english.

Thank for all replays.
- Ardno
 
Ok didn't get a single thing from that, what's wrong with messages again?
If player says a nickname on chat of those who is vanished, cancel the message.

This is kinda dumb, this way a player know with other user is vanished just by typing the name on chat (it will cancel the message).

------

OP:

You should cancel the /tell and /r commands to be sent for vanished players.

on command "/tell":
#dostuff
 
If player says a nickname on chat of those who is vanished, cancel the message.

This is kinda dumb, this way a player know with other user is vanished just by typing the name on chat (it will cancel the message).

------

OP:

You should cancel the /tell and /r commands to be sent for vanished players.

on command "/tell":
#dostuff

No, I don't want send message to normal players, but players with permission trenend.vanish.visit. But I don't know how, because I use variable {v::*} - which is work IF only 1 player is vanished, but not 2+
 
Example:

Player is vanished, but only for players, which doesn't have perm trenend.vanish.visit

Player WITH PERMISSION want to send message to chat(message contains name of vanished player).

I want to cancel message.
Code(doesn't work):
Code:
on chat:
    if player has permission "trenend.vanish.visit":
        if message contains "%{v::*}%":
            cancel event
            message "Useful message xd" to player
 
Status
Not open for further replies.