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!

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

Enemy tab colors

Discussion in 'Requests' started by Jonathan Cohen, Aug 16, 2019.

  1. Jonathan Cohen

    Joined:
    Jul 31, 2019
    Messages:
    24
    Likes Received:
    0
    Category: Tablist Name

    Suggested name: EnemyTab

    Spigot/Skript Version: Latest

    What I want:
    A proper description. https://ibb.co/ysvrhjK

    Ideas for commands: None

    Ideas for permissions: None

    I hope anyone can help me with this. Best regards, Jonathan.
     
  2. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Pseudo code:
    Code (Skript):
    1. on join:
    2.     loop all players:
    3.         if loop-player is not player:
    4.             set loop-player's tab name to "&c%loop-player's display name%" for player
    5.     set player's tab name to "&a%player's display name%" for player
    6. # do the same for teams, check if loop-player is in player's team and boom apply the color
    7.        
     
    #2 malia, Aug 16, 2019
    Last edited: Aug 17, 2019
    • Like Like x 1
  3. Jonathan Cohen

    Joined:
    Jul 31, 2019
    Messages:
    24
    Likes Received:
    0
    Thank you very much!
    --- Double Post Merged, Aug 17, 2019, Original Post Date: Aug 17, 2019 ---
    I have a problem with it because when I join it sets my player name color to and the other player's color to red but when I switch to the dummy player perspective then his name is also in red instead of green and the other player's name is in green. Can you make it so it's a sort of private tab color name and only you see your name in green and the other player's in red and that for each person?
     
  4. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    Updated the code, take a look at it again and give me feedback! :emoji_slight_smile:
     
  5. Jonathan Cohen

    Joined:
    Jul 31, 2019
    Messages:
    24
    Likes Received:
    0
    loop-player's tab name can't be set to '"&c%loop-player's display name%" for player' because the latter is not a text (enemy tab.sk, line 4: set loop-player's tab name to "&c%loop-player's display name%" for player')
    [18:12:49 ERROR]: the player's tab name can't be set to '"&a%player's display name%" for player' because the latter is not a text (enemy tab.sk, line 5: set player's tab name to "&a%player's display name%" for player')
     
  6. Hiqe

    Hiqe Member

    Joined:
    Jul 5, 2019
    Messages:
    10
    Likes Received:
    0
    What addon needed ?
     
  7. malia

    malia Well-Known Member

    Joined:
    Jul 24, 2019
    Messages:
    314
    Likes Received:
    21
    I don't know, do a research on docs
     

Share This Page

Loading...