We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96e58a2 commit a58b61aCopy full SHA for a58b61a
1 file changed
Code/Examples/HotPotatoScript.cs
@@ -1,5 +1,8 @@
1
-namespace SER.Code.Examples;
+using JetBrains.Annotations;
2
3
+namespace SER.Code.Examples;
4
+
5
+[UsedImplicitly]
6
public class HotPotatoScript : Example
7
{
8
public override string Name => "hotPotato";
@@ -14,6 +17,11 @@ Wait 1m
14
17
# Get a random player from the alive players
15
18
@potatoCarrier = LimitPlayers @alivePlayers 1
16
19
20
+ # if no player is alive, continue to next attempt
21
+ if {AmountOf @potatoCarrier} is 0
22
+ continue
23
+ end
24
25
Hint @potatoCarrier 3s "YOU HAVE THE HOT POTATO! DROP IT OR DIE!"
26
GiveItem @potatoCarrier GunA7
27
@@ -27,6 +35,7 @@ Wait 3s
35
continue
28
36
end
29
37
38
+ AdvDestroyItem *item
30
39
Explode @potatoCarrier
31
40
Broadcast @all 5s "{@potatoCarrier name} failed the Hot Potato!"
32
41
stop
0 commit comments