Prefixes for teams

  • 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.

claytyne

Member
May 12, 2020
26
0
1
23
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:
command /joinred:
    trigger:
        set {player} to {TeamRed}

on chat:
    if player is {TeamRed}:
        set the chat format to "&c%player%&r: %message%"
        stop


on chat:
    if player is not {TeamRed}:
        set the chat format to "%player%: %message%"
        stop

I'm not the best at Skript and it would be amazing if someone helped me.
 
Try
Code:
command /joinred:
    trigger:
        set {%player%.team} to "RED"
 
on chat:
    if {%player%.team} is "RED":
        cancel event
        broadcast "%colored player's prefix% &c%player%&r %colored player's suffix%: %message%"
    else:
        cancel event
        broadcast "%colored player's prefix% %player% %colored player's suffix%: %message%"

Have not tested it, but it should work
 
Status
Not open for further replies.