Skip to content

Commit

Permalink
Fix threading
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Oct 22, 2024
1 parent 9be360f commit f7a9ddf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CS2/Raffle/StartRaffleCommand.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using GangsAPI.Data;
using GangsAPI.Data.Command;
Expand All @@ -21,7 +22,7 @@ public Task<CommandResult> Execute(PlayerWrapper? executor,
if (!int.TryParse(info.Args[1], out amo))
return Task.FromResult(CommandResult.PRINT_USAGE);

raffle.StartRaffle(amo);
Server.NextFrame(() => raffle.StartRaffle(amo));
return Task.FromResult(CommandResult.SUCCESS);
}
}

0 comments on commit f7a9ddf

Please sign in to comment.