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.

Prefixes for teams

Discussion in 'Skript' started by claytyne, Aug 23, 2020.

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

    claytyne Member

    Joined:
    May 12, 2020
    Messages:
    26
    Likes Received:
    0
    I cant get this to work, it has no error but it just doesn't work. i want to be able to add players to teams, red and blue.


    Code (Text):
    1. command /joinred:
    2.     trigger:
    3.         set {player} to {TeamRed}
    4.  
    5. on chat:
    6.     if player is {TeamRed}:
    7.         set the chat format to "&c%player%&r: %message%"
    8.         stop
    9.  
    10.  
    11. on chat:
    12.     if player is not {TeamRed}:
    13.         set the chat format to "%player%: %message%"
    14.         stop
    15.  
    I'm not the best at Skript and it would be amazing if someone helped me.
     
  2. Expel_

    Expel_ New Member

    Joined:
    Aug 23, 2020
    Messages:
    8
    Likes Received:
    0
    Try
    Code (Text):
    1. command /joinred:
    2.     trigger:
    3.         set {%player%.team} to "RED"
    4.  
    5. on chat:
    6.     if {%player%.team} is "RED":
    7.         cancel event
    8.         broadcast "%colored player's prefix% &c%player%&r %colored player's suffix%: %message%"
    9.     else:
    10.         cancel event
    11.         broadcast "%colored player's prefix% %player% %colored player's suffix%: %message%"
    12.  
    Have not tested it, but it should work
     
Thread Status:
Not open for further replies.

Share This Page

Loading...