PDA

View Full Version : Forcing a round end?


Scrumilation
10-16-2014, 19:42
How would i do it?

This is what i tried:
EndRound()
{
new Handle:roundEndEvent = CreateEvent("round_end");
FireEvent(roundEndEvent);
}
iirc i also tried using some arguments (eventsetint or something like that) but the round would still not end.

InB
10-16-2014, 20:02
for cs:s try CS_TerminateRound

Mitchell
10-16-2014, 20:43
mp_forcewin <team> (0 for stalemate
I found that command useful (cheap way too) to end the round.

Scrumilation
10-16-2014, 22:18
for cs:s try CS_TerminateRound

It's cs:go, but i'll try it, i guess it should work because a quick google code found this: https://github.com/Theadd/govip/blob/master/addons/sourcemod/scripting/govip.sp and it's for cs:go.

mp_forcewin <team> (0 for stalemate
I found that command useful (cheap way too) to end the round.

This looks a bit more unsafe, calling a native function seems better, but i'll try it too, maybe it works better.

Thanks for the answers.

LambdaLambda
10-16-2014, 22:27
It's cs:go, but i'll try it, i guess it should work because a quick google code found this: https://github.com/Theadd/govip/blob/master/addons/sourcemod/scripting/govip.sp and it's for cs:go.Don't worry. It's tested and it works. I've been using it over a year ago. https://forums.alliedmods.net/showpost.php?p=2062990&postcount=4441

Powerlord
10-16-2014, 23:12
Last I heard, the previously mentioned CS_TerminateRound (https://sm.alliedmods.net/api/index.php?fastload=show&id=966&) works fine in CS:GO.

The valid end reasons are:
CSRoundEnd_TargetBombed, /**< Target Successfully Bombed! */
CSRoundEnd_VIPEscaped, /**< The VIP has escaped! */
CSRoundEnd_VIPKilled, /**< VIP has been assassinated! */
CSRoundEnd_TerroristsEscaped, /**< The terrorists have escaped! */
CSRoundEnd_CTStoppedEscape, /**< The CTs have prevented most of the terrorists from escaping! */
CSRoundEnd_TerroristsStopped, /**< Escaping terrorists have all been neutralized! */
CSRoundEnd_BombDefused, /**< The bomb has been defused! */
CSRoundEnd_CTWin, /**< Counter-Terrorists Win! */
CSRoundEnd_TerroristWin, /**< Terrorists Win! */
CSRoundEnd_Draw, /**< Round Draw! */
CSRoundEnd_HostagesRescued, /**< All Hostages have been rescued! */
CSRoundEnd_TargetSaved, /**< Target has been saved! */
CSRoundEnd_HostagesNotRescued, /**< Hostages have not been rescued! */
CSRoundEnd_TerroristsNotEscaped, /**< Terrorists have not escaped! */
CSRoundEnd_VIPNotEscaped, /**< VIP has not escaped! */
CSRoundEnd_GameStart, /**< Game Commencing! */

// The below only exist on CS:GO
CSRoundEnd_TerroristsSurrender, /**< Terrorists Surrender */
CSRoundEnd_CTSurrender, /**< CTs Surrender */

Changes are you'll want one of these 3: CSRoundEnd_CTWin, CSRoundEnd_TerroristWin, CSRoundEnd_Draw

Scrumilation
10-17-2014, 00:05
Don't worry. It's tested and it works. I've been using it over a year ago. https://forums.alliedmods.net/showpost.php?p=2062990&postcount=4441

Yeah I tested it and it works fine, thanks a lot.