HL2DM Weapons Regenerator

So, when you take a weapon or an item in a HL2DM map, it is supposed to respawn after a while, but it doesn’t in GMod.
I tried making a script but ended up making everything slower for some reason and I’m not planning to waste the rest of my time on that script, so could someone with more knowledge than me make this easy Weapon Respawner script for me?

No one so far? Come on, please, is it that hard for you?

I’ll have a look into this later and see what I can come up with.

Would you mind showing what you’ve come up with? I want to see if you started going in the right direction.

I deleted my code not too long ago, no saves of before. But basically, I was getting a list classes+positions of item_* and weapon_* entities on InitPostEntity hook and then delete all item_* and weapon_* entities to respawn them so the ones taken by players would respawn too every minute.

You could make a table and fill it with the locations and a link to the actual entity. At X seconds, iterate through the table, checking if the entity exists. If it does, skip it. If it does not, create a new entity at the locations stored.

You would need to make some sort of static entity that gives the player the weapon, and removes itself upon coming in contact with the player. Reason being, is the weapon will still exist even if it is picked up by a player, disallowing any further spawning of the new weapon until the player has died (Also assuming players do not drop weapons on their death)

Hope this helps.