Jump to content

combat wall skript


N1kk32

Recommended Posts

hello i made this combat wall skript and it works but if i get in combat im not able to enter the region for ever

on damage:
    if attacker is a player:
        set {combat::%attacker's uuid%} to now
        set {combat::%victim's uuid%} to now

on region enter:
        if region contains "smpspawn":
                if {combat::%player's uuid%} is set:
                set {_time} to difference between {combat::%player's uuid%} and now
                if {_time} < 15 seconds:
                send "&cYou can't enter spawn during combat" to player
                cancel event

Link to comment
Share on other sites

You need to indent properly

 

on damage:
    if attacker is a player:
        set {combat::%attacker's uuid%} to now
        set {combat::%victim's uuid%} to now

on region enter:
        if region contains "smpspawn":
                if {combat::%player's uuid%} is set:
                set {_time} to difference between {combat::%player's uuid%} and now
                if {_time} < 15 seconds:
                  send "&cYou can't enter spawn during combat" to player
                  cancel event

Link to comment
Share on other sites

  • 3 weeks later...
On 7/17/2022 at 7:36 PM, N1kk32 said:

hello i made this combat wall skript and it works but if i get in combat im not able to enter the region for ever

on damage:
    if attacker is a player:
        set {combat::%attacker's uuid%} to now
        set {combat::%victim's uuid%} to now

on region enter:
        if region contains "smpspawn":
                if {combat::%player's uuid%} is set:
                set {_time} to difference between {combat::%player's uuid%} and now
                if {_time} < 15 seconds:
                send "&cYou can't enter spawn during combat" to player
                cancel event

I've seen this used on HCF servers good to see someone made a skript of this

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...