Skip to content

Commit a58b61a

Browse files
Update HotPotatoScript.cs
1 parent 96e58a2 commit a58b61a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Code/Examples/HotPotatoScript.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
namespace SER.Code.Examples;
1+
using JetBrains.Annotations;
22

3+
namespace SER.Code.Examples;
4+
5+
[UsedImplicitly]
36
public class HotPotatoScript : Example
47
{
58
public override string Name => "hotPotato";
@@ -14,6 +17,11 @@ Wait 1m
1417
# Get a random player from the alive players
1518
@potatoCarrier = LimitPlayers @alivePlayers 1
1619
20+
# if no player is alive, continue to next attempt
21+
if {AmountOf @potatoCarrier} is 0
22+
continue
23+
end
24+
1725
Hint @potatoCarrier 3s "YOU HAVE THE HOT POTATO! DROP IT OR DIE!"
1826
GiveItem @potatoCarrier GunA7
1927
@@ -27,6 +35,7 @@ Wait 3s
2735
continue
2836
end
2937
38+
AdvDestroyItem *item
3039
Explode @potatoCarrier
3140
Broadcast @all 5s "{@potatoCarrier name} failed the Hot Potato!"
3241
stop

0 commit comments

Comments
 (0)