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.

Variable is not working

Discussion in 'Requests' started by Ruubgaming, Mar 11, 2020.

  1. Ruubgaming

    Ruubgaming Member

    Joined:
    Mar 11, 2020
    Messages:
    2
    Likes Received:
    0
    If I die it wont work.

    on death:
    set {playersalive} to {playersalive} - 1
    wait 1 tick
    if {playersalive} is "0":
    loop all players in world "pvp":
    message "&c[Server-Pvp] &fHet gevecht is afgelopen" to loop-player
    set {_amount} to amount of players in world "pvp"
    if {_amount} is greater than 0:
    execute player command "/consolepvpstart"
     
  2. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    44
    Pls use format
     
  3. GemsMC

    GemsMC Member

    Joined:
    Feb 8, 2020
    Messages:
    19
    Likes Received:
    1
    Code (Text):
    1. on death:
    2.     set {playersalive} to ({playersalive}-1)
    3.     wait 1 tick
    4.     if {playersalive} parsed as number is 0:
    5.         loop all players in world "pvp":
    6.             message "&c[Server-Pvp] &fHet gevecht is afgelopen" to loop-player
    7.             set {_amount} to amount of players in world "pvp"
    8.     if {_amount} > 0:
    9.         execute player command "consolepvpstart"
     
  4. Baezor

    Baezor Member

    Joined:
    Jan 3, 2020
    Messages:
    14
    Likes Received:
    6
    Is the variable set anywhere? If not, just add this.
    Code (Text):
    1. if {playersalive} is not set:
    2.     set {playersalive} to 9999999999
     

Share This Page

Loading...