shanapu / MyWeaponAllocator

CSGO - Retakes weapon allocator
https://forums.alliedmods.net/showthread.php?t=309217
GNU General Public License v3.0
31 stars 13 forks source link

mp_restartgame has no effect on ascending rounds (pistol -> force -> full) #4

Closed borzaka closed 5 years ago

borzaka commented 5 years ago

If you reach to the full buy rounds, and execute mp_restartgame x, the full buy round continue instead of starting with pistol again.

_Edited: I meant mp_restartgame x insted of mp_restartround x_

shanapu commented 5 years ago

I think you or me confuse something. mp_restartround x just restart the current round. If the current round is a full buy round and you restart this round, the round will still be a full buy round.

did you mean mp_restartgame 1 ? If so, i have to test how https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events#cs_pre_restart works, maybe I can use this event to reset the roundcounter.

borzaka commented 5 years ago

Yes, sorry, I meant mp_restartgame x, when the round counter and every game stats go to 0.

shanapu commented 5 years ago

I will take a look at this, maybe need a while, have to find a smooth& sane way to hook mp_restartgame. Stay tuned

shanapu commented 5 years ago

I added a match restart hook and reset the round counter. I pushed it to 'onlyServer' branch https://github.com/shanapu/MyWeaponAllocator/archive/onlyServer.zip . Couldn't test it very well. Please test.

borzaka commented 5 years ago

I have uploaded and overwrited every file on the server with the ZIP, and then restarted the server, but nothing is changed: After mp_restartgame 1, full-buy rounds continue.

shanapu commented 5 years ago

give this a new try.

borzaka commented 5 years ago

It's working: after rcon mp_restartgame 1 a new pistol round started. Thank you.

shanapu commented 5 years ago

thanks! I will merge this to master branch as new version soon.