Skript Version: 2.2 dev36 (latest)
Skript Author: Bensku
Minecraft Version: 1.12
I'm trying to do ranks for my FreeOP server in Skript. I can't use permissions, because it's FreeOP (where everyone is opped). I have in game command for setting rank. But now I want to define multiple list variables in "contains", so if player is in moderator list or in helper list (for example), it will do certain action, else cancel the event: player is not staff. I have tired to put the variables in brackets, but it always kept canceling the event, just like if player wasn't staff, even if he was in the {list::variable::*} list variable. My question is, how to define multiple list variables in 'contains' properly.
---
Code:
Errors on Reload:
Console errors:
Other Useful Info:
Addons using (including versions):
None
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I tired to do it without brackets, but the result was same.
Skript Author: Bensku
Minecraft Version: 1.12
I'm trying to do ranks for my FreeOP server in Skript. I can't use permissions, because it's FreeOP (where everyone is opped). I have in game command for setting rank. But now I want to define multiple list variables in "contains", so if player is in moderator list or in helper list (for example), it will do certain action, else cancel the event: player is not staff. I have tired to put the variables in brackets, but it always kept canceling the event, just like if player wasn't staff, even if he was in the {list::variable::*} list variable. My question is, how to define multiple list variables in 'contains' properly.
---
Code:
code_language.skript:
command /setrank <player> <text>:
executable by: console
trigger:
if arg 1 is set:
if arg 2 is set:
if arg 2 is "helper":
add argument 1 to {staff::helpers::*}
broadcast "Adding &e%arg 1% &cto the helpers list."
stop
if arg 2 is "moderator" or "mods":
add argument 1 to {staff::moderators::*}
broadcast "Adding &e%arg 1% &cto the moderators list."
stop
if arg 2 is "owner":
add argument 1 to {staff::owners::*}
broadcast "&c&lAdding &e%arg 1% &cto the &lOWNERS &clist."
stop
else:
message "Invalid rank" to player
command /test:
trigger:
[B] if ({staff::moderators::*}, {staff::helpers::*} or {staff::owners}) contains player's name:[/B]
message "works" to player
else:
message "sad panda :(" to player
Errors on Reload:
code_language.skript:
None.
Console errors:
code_language.skript:
none
Other Useful Info:
Addons using (including versions):
None
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I tired to do it without brackets, but the result was same.