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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

pvp quit

Discussion in 'Skript' started by Ter2FIc, Jan 24, 2021.

Thread Status:
Not open for further replies.
  1. Ter2FIc

    Ter2FIc Member

    Joined:
    Dec 30, 2020
    Messages:
    20
    Likes Received:
    0
    Code (Text):
    1. on damage:
    2.     set {pvp::%victim%} to true
    3.  
    4. on quit:
    5.     if {pvp::%player%} is true:
    6.         execute console command "warn %player% don't quit on pvp"
    7.  
    8. if {pvp::%player%} is true:
    9.     wait 20 seconds:
    10.         if player took no damage:
    11.             set {pvp::%player%} to false
    Why doesn't this work?
    can't understand this event: 'if {pvp::%player%} is true' (bpvp.sk, line 8: if {pvp::%player%} is true:')
     
  2. Ankoki

    Moderator Supporter Addon Developer

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    12
    i for one recommend you use %player's uuid%, but your using if {pvp::%player%} is true: as an event, you need to have all code in triggers
     
  3. Valerycraft

    Valerycraft Member

    Joined:
    Jan 24, 2021
    Messages:
    4
    Likes Received:
    0
    You put a {pvp::%player%} But the 2 :: = error, so the working one is {pvp.%player%}
     
  4. Ankoki

    Moderator Supporter Addon Developer

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    12
    nope not even close, :: is a list, and . does nothing, :: is preferable along with %player's uuid%, the issue is `if {pvp::%player%} is true` is not an event
     
  5. Ter2FIc

    Ter2FIc Member

    Joined:
    Dec 30, 2020
    Messages:
    20
    Likes Received:
    0
    What do you mean I need to have all code in triggers?
    Do you mean I need to put trigger:?
     
  6. Ankoki

    Moderator Supporter Addon Developer

    Joined:
    Nov 5, 2020
    Messages:
    55
    Likes Received:
    12
    No. I mean you need to have it under an event. Such as
    Code (Text):
    1. every second:
    2.     if {pvp::%player's uuid%} is true:
    3.         wait 20 seconds
    4.         if player took no damage: #not sure if this is real but meh
    5.             set {pvp::%player's uuid%} to false
    I used player's uuid as you should probably migrate to using that but that makes more sense c:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...