Create mapvote

This commit is contained in:
Resxt
2022-10-20 22:21:08 +02:00
parent ed74e92e0f
commit 92c37b15ea
6 changed files with 970 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#include maps\mp\_utility;
Init()
{
if (GetDvarInt("mapvote_enable"))
{
replaceFunc(maps\mp\gametypes\_killcam::finalkillcamwaiter, ::OnKillcamEnd);
}
}
OnKillcamEnd()
{
if (!IsDefined(level.finalkillcam_winner))
{
if (isRoundBased() && !wasLastRound())
return false;
wait 3;
level notify("vote_start");
level waittill("vote_end");
return false;
}
level waittill("final_killcam_done");
if (isRoundBased() && !wasLastRound())
return true;
wait 3;
level notify("vote_start");
level waittill("vote_end");
return true;
}