Actionbars :P

  • 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.
How can I keep an actionbar stay until removed?

My current code:

Code:
command /watch [<offlineplayer>]:
    permission: admin.watch
    trigger:
        if arg-1 isn't set:
            send "&cUsage: /watch <player>" to player
        else if arg-1 is set:
            if arg-1 is online:
                teleport player to arg-1
                send "Success!"
                send action bar "&cCurrently watching: &e%arg-1%" to player

Thanks in advance,

me :emoji_slight_smile:
 
Code:
function toggle_action_bar(p: player, watching: player):
    if {actionBar::%{_p}%} is set:
        delete {actionBar::%{_p}%}
        stop
    set {actionBar::%{_p}%} to true
    while {actionBar::%{_p}%} is set:
        send action bar "&cCurrently watching: &e%{_watching}%" to {_p}
        wait a second

command /watch [<offlineplayer>]:
    permission: admin.watch
    trigger:
        if arg-1 isn't set:
            send "&cUsage: /watch <player>" to player
        else if arg-1 is set:
            if arg-1 is online:
                teleport player to arg-1
                toggle_action_bar(player, arg-1)
 
Last edited:
it shows this:
 

Attachments

  • Screenshot 2021-03-21 at 12.41.55.png
    Screenshot 2021-03-21 at 12.41.55.png
    38.3 KB · Views: 102
Status
Not open for further replies.