Solved How to add Actionbar to script?

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

Adrihun

Member
Feb 1, 2017
368
6
0
Here is my Vanish script

I want to make it so if you have vanished it says "vanished" in Actionbar.
Right now, the text disappears after 1 second. Is it possible to change this so it will stay there until you do /vanish again?


code_language.skript:
command /vanish:
    usage: no
    permission: vanish.use
    permission message: no
    trigger:
        if {sql_.mineplex.vanish.%player%} is true:
            loop all players:
                loop-value doesn't have permission "vanish.see"
                add loop-value to {_vanishto::*}
            reveal player from all players
            set {sql_.mineplex.vanish.%player%} to false
            send "not vanished"
        else:
            loop all players:
                loop-value doesn't have permission "vanish.see"
                add loop-value to {_vanishto::*}
            hide player from {_vanishto::*}
            set {sql_.mineplex.vanish.%player%} to true
            send "you are vanishd"
            send "staff or higher can still see yu"
            show an action bar from "test" to player
 
Change this
code_language.skript:
show an action bar from "test" to player
For this.
code_language.skript:
while player is online:
    set action bar of player to coloured "Test"
 
code_language.skript:
set {sql_.mineplex.vanish.%player%} to true
send "you are vanishd"
send "staff or higher can still see yu"
while {sql_.mineplex.vanish.%player%} is true:
    show an action bar from "test" to player
    wait a second
 
@HiiqhFive If player leaves, the actionbar will dissapear and they will still have vanish on. How do you fix this?
 
@HiiqhFive Should i clear {sql_.mineplex.vanish.%player%} on disconnect aswell?
(i dont want to store useless data in the database)

Also is on quit the same as on disconnect?
 
Status
Not open for further replies.