Skip to content

Commit

Permalink
fix: check valid before drug all
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-yao committed Dec 25, 2024
1 parent 6278f61 commit f0ba820
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion l4d2_tank_draw/scripting/lib/lucky_draw.sp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ stock Action LuckyDraw(int victim, int attacker)
{
for (int i = 1; i <= MaxClients; i++)
{
SetDrug(i, DrugAllSurvivorDuration.IntValue);
if (IsValidAliveClient(i))
{
SetDrug(i, DrugAllSurvivorDuration.IntValue);
}
}

CPrintToChatAll("%t", "TankDrawResult_DrugAll", attackerName, DrugAllSurvivorDuration.IntValue);
Expand Down

0 comments on commit f0ba820

Please sign in to comment.