Solved How to check if player is a member of a worldguard region

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

zainmz

Member
Apr 29, 2017
22
1
0
25
Skript Version (do not put latest): Skript bensku-2.5-alpha3
Skript Author: Bensku
Minecraft Version: 1.15.2 Paper
---
Full Code:
Code:
command /regionflags <text> <text> :
    permission: regionflags.use
    trigger:
        if arg 1 is "pvp":
            set {_region} to "%region at player%"
            set {_sections::*} to {_region} split at " "
            if player is member of region at player:
                if arg 2 is "on":
                    execute console command "/rg flag %{_sections::1}% pvp -w Mattupolis allow"
                    execute console command "/eco take %player% 1000"
                    message "&0[&3Property&0]&a PVP is now ON"
                else if arg 2 is "off":
                    execute console command "/rg flag %{_sections::1}% pvp -w Mattupolis deny"
                    execute console command "/eco take %player% 1000"
                    message "&0[&3Property&0]&c PVP is now OFF"
            else:
                message "&cYou are not standing in any owned region!"

There are no error codes, it just doesnt seem to work. i cant identify what exactly is wrong...
 
Nope still doesnt help :emoji_frowning:, it has something to do with check if player is a member of a region. That part doesnt seem to work
 
Does this work?
Code:
if player is member of the region {_sections::1}:
 
Status
Not open for further replies.