1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tab issue

Discussion in 'Skript' started by BlaxkExy, Aug 21, 2022.

Thread Status:
Not open for further replies.
  1. BlaxkExy

    BlaxkExy Member

    Joined:
    Aug 21, 2022
    Messages:
    1
    Likes Received:
    0
    So i recently made some skript to save for later and rn i decided to start a server but im trying to fix this and i simply cant... ik it will seem dumb but i stuck at this issue for like 3h and idk what to do

    The skript is a tab skript and the rank wont show, It just shows me "member blaxkexy" even if my perm is "group.owner". You'll understand after looking below

    this is the code:

    every 1 second:
    set all players' tab list header to "&8&l&m------------ %newline%%newline%&c&lExMines%newline%&4Custom Coded &8| &cSeason 1%newline%"

    on player join:
    if player has permission "group.owner":
    set player's tab list name to "&4&lOwner &7%player%"
    if player has permission "group.dev":
    set player's tab list name to "&2&lDev &7%player%"
    if player has permission "group.manager":
    set player's tab list name to "&4&lManager &7%player% &3&lSTAFF"
    if player has permission "group.admin":
    set player's tab list name to "&c&lAdmin &7%player% &3&lSTAFF"
    if player has permission "group.jradmin":
    set player's tab list name to "&c&lJr. Admin &7%player% &3&lSTAFF"
    if player has permission "group.moderator":
    set player's tab list name to "&3&lMod &7%player% &3&lSTAFF"
    if player has permission "group.helper":
    set player's tab list name to "&6&lHelper &7%player% &3&lSTAFF"
    if player has permission "group.trainee":
    set player's tab list name to "&5&lTrainee &7%player%"
    if player has permission "group.default":
    set player's tab list name to "&7Member &7%player%"


    and heres the pic:
    basically even if i have any group. permission it keeps me as member
    upload_2022-8-21_14-50-27.png
     
  2. TheDoggy

    TheDoggy New Member

    Joined:
    Sep 2, 2021
    Messages:
    8
    Likes Received:
    0
    Because you have the perm "group.default" it can give you that rank. You should do use this:

    Code (Text):
    1. if player has permission "group.owner":
    2.  set player's tablist name to "&4&lOwner &7%player%"
    3. else:
    4.  if player has permission "group.dev":
    5.   set player's tablist name to "&2&lDev &7%player%"
    6.  else:
    And so on.
    Using else: will make sure it tests if you have owner FIRST and if you do, it won't check if you have the other ranks.
     
  3. Sabified

    Sabified Member

    Joined:
    Jun 5, 2022
    Messages:
    30
    Likes Received:
    2
    If you're using if on every thing, here is what the code is doing:
    hm ok does this player have "group.owner" permission? oh yes the player does. then i will set the tablist name to owner
    *repeat until the last line*
    oh does this player have "group.default"? yes he does, here is your tablist name member

    if you set else if: on the rest, it will think:
    does the player have "group.owner"? yep, here is the tablist name owner
    *ignores the rest of the if statements*


    Code (Text):
    1. every 1 second:
    2.     set all players' tab list header to "&8&l&m------------ %newline%%newline%&c&lExMines%newline%&4Custom Coded &8| &cSeason 1%newline%"
    3.  
    4. on player join:
    5.     if player has permission "group.owner":
    6.         set player's tab list name to "&4&lOwner &7%player%"
    7.     else if player has permission "group.dev":
    8.         set player's tab list name to "&2&lDev &7%player%"
    9.     else if player has permission "group.manager":
    10.         set player's tab list name to "&4&lManager &7%player% &3&lSTAFF"
    11.     else if player has permission "group.admin":
    12.         set player's tab list name to "&c&lAdmin &7%player% &3&lSTAFF"
    13.     else if player has permission "group.jradmin":
    14.         set player's tab list name to "&c&lJr. Admin &7%player% &3&lSTAFF"
    15.     else if player has permission "group.moderator":
    16.         set player's tab list name to "&3&lMod &7%player% &3&lSTAFF"
    17.     else if player has permission "group.helper":
    18.         set player's tab list name to "&6&lHelper &7%player% &3&lSTAFF"
    19.     else if player has permission "group.trainee":
    20.         set player's tab list name to "&5&lTrainee &7%player%"
    21.     else if player has permission "group.default":
    22.         set player's tab list name to "&7Member &7%player%"
     
  4. Pierrelasse

    Pierrelasse Active Member

    Joined:
    Apr 20, 2022
    Messages:
    114
    Likes Received:
    4
    Bruh just get luckperms & vault
    then do /lp group <group> meta setprefix "&cBla "
    and then

    on join:
    set player's tab list name to "%player's prefix%%player%"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...