Solved Vanish

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

SoulSenGaming

New Member
Feb 13, 2018
9
0
0
34
So I've been trying to create a vanish command. But when trying to use the "reveal player from all players" and "hide players from all players" from Skunity, it won't work. I've tried looking at other forum post but none of them worked can someone maybe help me?

command /vanish:
description: Vanish
aliases: /v
trigger:
if {vanish.%player%} is true:
set {vanish.%player%} to false
reveal player from all players
message "Vanish is off!" to player
else:
set {vanish.%player%} to true
hide player from all players
message "Vanish is on!" to player
 
On the SkUnity docs, if you search "reveal", there's 3 methods. One with SkQuery, one with WildSkript and one with Skellett. Have you tried them all/have the addons?
 
Code:
command /vanish:
    aliases: /v
    permission: staff.vanish
    permission message: &cNo permission.
    trigger:
        if {vanish.%player%} is true:
            loop all players:
                loop-value doesn't have permission "admin.permission"
                add loop-value to {_vanishto::*}

            reveal player from all players 
            set {vanish.%player%} to false
            send "&aVanish is off!"
        else:
            loop all players:
                loop-value doesn't have permission "admin.permission"
                add loop-value to {_vanishto::*}

            hide player from {_vanishto::*}
            set {vanish.%player%} to true
            send "&aVanish is on!"

every 2 seconds:
    loop all players:
        if loop-value doesn't have permission "admin.permission"
        add loop-value to {_vanishto::*}
I don't know if this would work, I never tried this one myself but maybe you should give it a try. If you want to make all your staffs to be able to see vanished players you can change admin.permission to a permission that all your staffs have, such as staff.vanishsee
 
Code:
command /vanish:
    aliases: /v
    permission: staff.vanish
    permission message: &cNo permission.
    trigger:
        if {vanish.%player%} is true:
            loop all players:
                loop-value doesn't have permission "admin.permission"
                add loop-value to {_vanishto::*}

            reveal player from all players
            set {vanish.%player%} to false
            send "&aVanish is off!"
        else:
            loop all players:
                loop-value doesn't have permission "admin.permission"
                add loop-value to {_vanishto::*}

            hide player from {_vanishto::*}
            set {vanish.%player%} to true
            send "&aVanish is on!"

every 2 seconds:
    loop all players:
        if loop-value doesn't have permission "admin.permission"
        add loop-value to {_vanishto::*}
I don't know if this would work, I never tried this one myself but maybe you should give it a try. If you want to make all your staffs to be able to see vanished players you can change admin.permission to a permission that all your staffs have, such as staff.vanishsee

it says it cant understand the "if loop-value doesn't have permission "admin.permission" and the reveal player thing, idk if my skunity may be broken.
[doublepost=1518717833,1518717509][/doublepost]Nevermind guys, I think I figured out the problem, my skquery was broken. Though thanks for the help!
 
Status
Not open for further replies.