Team Owned Blocks?

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

OfficialImBad

Member
Aug 4, 2020
1
0
0
28
Hi there, I have been looking all over the forums and google if team owned blocks are possible,

e.g if you are part of Team Red you can break Team Blue's block but not Team Red's block and Team Blue can break Team Red's block but not Their own.
 
Code:
on place:
    if {team::red::%player%} is true:
        set {red::%event-block%} to true
    if {team::green::%player%} is true:
        set {green::%event-block%} to true
    if {team::blue::%player%} is true:
        set {blue::%event-block%} to true
    if {team::yellow::%player%} is true:
        set {yellow::%event-block%} to true

on break:
    if {team::red::%player%} is true:
        if {red::%event-block%} is true:
            cancel event
            send "&cYou cant break your teamates blocks!"
    if {team::blue::%player%} is true:
        if {blue::%event-block%} is true:
            cancel event
            send "&cYou cant break your teamates blocks!"
    if {team::yellow::%player%} is true:
        if {yellow::%event-block%} is true:
            cancel event
            send "&cYou cant break your teamates blocks!"
    if {team::green::%player%} is true:
        if {green::%event-block%} is true:
            cancel event
            send "&cYou cant break your teamates blocks!"
try that to see if it works I made it in like 1 minute
 
Status
Not open for further replies.