Basic tablist not working

Discussion in 'Skript' started by Cursinal, Feb 15, 2020.

  1. I've found skript for basic tablist but It's not working. Any ideas?


    Code (Text):
    options:
        Header: &7» &a&lHi &7«%nl%%nl%&7» &a%{Online}% &7Graczy %nl%
        Footer: &7-------------

    every second:
        loop all players:
            set tab header to "{@Header}" and footer to "{@Footer}" for loop-player
            set {Online} to number of all players
            stop
     
    upload_2020-2-15_16-43-50.png
     
  2. the script you found is non-functional, I mean the code of it is so dumb that it is never going to work properly, you should just not use it.

    1. it uses a GLOBAL variable which gets saved to database to save count of players online - why? server is already aware of how many players are online and player count is very temporary thing, no need to save that to database, it has no value between server restarts.

    2. it uses "stop" in a loop, meaning only first player will get looped through - other players won't get the tab header effect.

    3. it does stuff more often that it should. is player count guarranteed to change every second? in most servers no, so it shouldn't use every second and instead trigger a function on quit/join.

    also if you ever need to find why some syntax does not work, you can use skripthub.net

    it will tell you what version of Skript and what version of what addon you need to run the syntax, as long as it has the syntax in its database
     
    #2 Govindas, Feb 16, 2020
    Last edited: Feb 16, 2020