First of all thank you for your interest.
I just want to loop players from a few groups.
Groups:
1) redplayer
2) blueplayer
Thanks.
I just want to loop players from a few groups.
Groups:
1) redplayer
2) blueplayer
Thanks.
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!
You can always check out skUnity Downloads for downloads and any other information about Skript!
I think it was so.code_language.skript:loop all players: if loop-player's group is "redplayer": ... else if loop-player's group is "blueplayer": ...
loop-player has permission "example.vip":
command /teamjoin <text>:
description: &aJoin a Team!
trigger:
if arg is "red":
if {team::%player%} isn't set:
if player has permission "teams.red":
send "&aYou have joined team ""&cRed Team"""
set {team::%player%} to "red"
add player to {red::*}
if player doesn't have permission "teams.red":
send "&cYou do not have permssion to join the team: &4""Red Team"""
if {team::%player%} is set:
send "&cYou have already joined a team!"
command /teammsg:
trigger:
if {team::%player%} is set:
if {teammsg::%player%} is true:
clear {teammsg::%player%}
send "&cTeam MSG Set to FALSE!"
stop
if {teammsg::%player%} isn't set:
set {teammsg::%player%} to true
send "&aTeam MSG Set to TRUE!"
on chat:
if {teammsg::%player%} is true:
if {team::%player%} is "red":
cancel event
loop all players:
if {team::%loop-player%} is "red":
send "&aTEAM CHAT &7(&cRed&7)&f: %message%" to loop-player
command /teamleave:
trigger:
if {team::%player%} is set:
if {team::%player%} is "red":
remove player from {red::*}
clear {team::%player%}
send "&cYou have left your team!"
if {team::%player%} isn't set:
send "&cYou are not in a team!"
Code:command /teamjoin <text>: description: &aJoin a Team! trigger: if arg is "red": if {team::%player%} isn't set: if player has permission "teams.red": send "&aYou have joined team ""&cRed Team""" set {team::%player%} to "red" add player to {red::*} if player doesn't have permission "teams.red": send "&cYou do not have permssion to join the team: &4""Red Team""" if {team::%player%} is set: send "&cYou have already joined a team!" command /teammsg: trigger: if {team::%player%} is set: if {teammsg::%player%} is true: clear {teammsg::%player%} send "&cTeam MSG Set to FALSE!" stop if {teammsg::%player%} isn't set: set {teammsg::%player%} to true send "&aTeam MSG Set to TRUE!" on chat: if {teammsg::%player%} is true: if {team::%player%} is "red": cancel event loop all players: if {team::%loop-player%} is "red": send "&aTEAM CHAT &7(&cRed&7)&f: %message%" to loop-player command /teamleave: trigger: if {team::%player%} is set: if {team::%player%} is "red": remove player from {red::*} clear {team::%player%} send "&cYou have left your team!" if {team::%player%} isn't set: send "&cYou are not in a team!"
Not sure if this is what you wanted, but here
ok
Code:loop all players: if loop-player has permission "example.vip": send "%loop-player%" if loop-player doesn't have permission "example.vip": send "%loop-player% doesn't have vip"
What I wrote you earlier, right?I already did this. Isn't there a way to loop the group.
loop all players:
if loop-player's group is "redplayer":
#Code here
if loop-player's group is "blueplayer":
#Code here
if loop-player's group is "vip":
#Code here