roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2

Home Page:https://docs.cssharp.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add RunInNTicks or RunOnTick

busheezy opened this issue · comments

It would be great to be able to do things like "run in 3 ticks."

RunInNTicks(3, () => Logger.LogInformation("wooo, 3 ticks!"));

and/or

var futureTick = Server.TickedTime + 3;
RunOnTick(futureTick, () => Logger.LogInformation("wooo, 3 ticks!"));

This has been discussed briefly here: #354 (comment)

Killstreak made something for this a while ago, don't know if it still works or not.

https://discord.com/channels/1160907911501991946/1160925208203493468/1171270690016600114

Yep, it's mentioned in the comment linked above.

I was going to bring an issue up sooner or later about integrating it into CS#, it's nice.