Fix for items randomly not being added during spawn

I had issues with this plugin, most of the time, no issues at all, but at random players would spawn and items weren't added, they'd have to wait for the refresh timer to hit or try respawning again.

 

I solved this issue by changing the player respawned function to the following.

 

private void OnPlayerRespawned(BasePlayer player)
{
timer.Once(1.5f, () =>
{
DoItems(player);
});
}

I spent about a month on and off debugging this because it's been so random to pin down and debug, logging every little detail in console and everything matched between the player who got items and the player that didn't. Finally I ended up doing a couple of days ago what you've done here but I've set mine to 3 seconds and yes it appears to have solved the issue! Glad you've also found the answer too :) What a nightmare lol

I used the same solution with a .25 delay for my custom loadouts randomly not gettting every item or getting put in random places when spawning. It was only an issue for people with higher ping.