Variable is not working

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

Ruubgaming

Member
Mar 11, 2020
2
0
1
18
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"
 
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"

Pls use format
 
Code:
on death:
    set {playersalive} to ({playersalive}-1)
    wait 1 tick
    if {playersalive} parsed as number 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} > 0:
        execute player command "consolepvpstart"
 
Is the variable set anywhere? If not, just add this.
Code:
if {playersalive} is not set:
    set {playersalive} to 9999999999