1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spawn blocker

Discussion in 'Requests' started by neb1u, Aug 1, 2022.

  1. neb1u

    neb1u Member

    Joined:
    Jul 28, 2022
    Messages:
    2
    Likes Received:
    0
    so I want a skript so when you get in combat you can not enter back into spawn
    i have a combat tag skript i made but idk if you need it ill just put it here
    it needs to work 1.17
    on damage:
    if attacker is a player:
    set {combat::%attacker's uuid%} to now
    set {combat::%victim's uuid%} to now
    if {combat::%attacker's uuid%} is set:


    on command:
    if player is not op:
    if {combat::%player's uuid%} is set:
    set {_time} to difference between {combat::%player's uuid%} and now
    if {_time} < 15 seconds:
    send "&cYour currenly in combat, please wait" to player
    cancel event
     
  2. MiiTsY

    MiiTsY Member

    Joined:
    May 27, 2022
    Messages:
    41
    Likes Received:
    1
    use worldguard to make regions

    then in skript something like
    on region enter:
    if "%event-region%" = "-your region name- in world world":
    set {_time} to difference between {combat::%event-player's uuid%} and now
    if {_time} < 15 seconds:
    cancel event
     
    #2 MiiTsY, Aug 12, 2022
    Last edited: Aug 12, 2022
  3. neb1u

    neb1u Member

    Joined:
    Jul 28, 2022
    Messages:
    2
    Likes Received:
    0
    i did it now even if im oped and in spawn i cant move

    on region enter:
    if "%event-region%" = "-spawn-world":
    set {_time} to difference between {combat::%event-player's uuid%} and now
    if {_time} < 15 seconds:
    cancel event
     
    #3 neb1u, Aug 14, 2022
    Last edited: Aug 14, 2022
  4. MiiTsY

    MiiTsY Member

    Joined:
    May 27, 2022
    Messages:
    41
    Likes Received:
    1
    sorry didnt check the forum for a few days, just add a if to check player's permissions
     

Share This Page

Loading...