Reseting the map

How would i make a script that resets the map? Making the weapons placed on the map respawn, togheter with the players and their stats? I’ve searched the Wiki but i can’t seem to find anything… Anyone got any ideas? (Yes, I’m making a gamemode). Something like the normal Css match gamemode.

Type restart in the console.

Could you tell me what function its binded to? Because it seems to do… nothing.

  1. it does not respawn yourself.
  2. It does not reset your stats.
  3. It does not reset the weapons on the map

Oh, I thought it still applied to source. ( That was in the goldsource engine)

This might help.

I may be wrong, but I think all you need to do is change the map through console, or ULX, or ASSMod or whatever you use, to the same map. It resets weapons, items, etc.

I can’t think of how to get it like CS:S’s restarting, though.

Edit:
Or wait, is there a repopulate command for console?

You can get it like CS:S’s - With the function I posted above.

I saw that, but it has some limitations:

I’m not quite sure how they might affect OP’s gamemode, because I don’t know what it’s like.
Anyway, yeah, use yours if it’s better (which it probably is).

changelevel “mapname” (without quotes) And it will reset everything, except mods… ofcourse

But it requires a complete load. Not like counterstrike at all.

Yeah, would be nice with just a fast restart, without the loading screen.