mirror of
https://github.com/Resxt/XLabs-S1X-Scripts.git
synced 2025-04-19 21:52:54 +00:00
mapvote 1.0.3
Destroy HUDs once the timer runs out The mapvote HUDs used to stay until the map rotated which as a result would display the mapvote HUDs even when the timer had run out and the game was trying to only display the scoreboard to have a clean post game screen. It would also unnecessarily allow players to still use the menu although the vote was already ended
This commit is contained in:
parent
241dd8458c
commit
0b23b5780a
@ -406,7 +406,7 @@ CreateVoteMenu()
|
||||
}
|
||||
}
|
||||
|
||||
player CreateHudText(buttonsHelpMessage, level.mapvote_hud_font, level.mapvote_hud_fontscale, "CENTER", "CENTER", 0, 210);
|
||||
player.mapvote["help_message_hud"] = player CreateHudText(buttonsHelpMessage, level.mapvote_hud_font, level.mapvote_hud_fontscale, "CENTER", "CENTER", 0, 210);
|
||||
}
|
||||
}
|
||||
|
||||
@ -686,6 +686,29 @@ DoRotation(modeName, mapName)
|
||||
{
|
||||
SetDvar("sv_maprotationcurrent", "gametype " + modeName + " map " + mapName);
|
||||
SetDvar("sv_maprotation", "gametype " + modeName + " map " + mapName);
|
||||
|
||||
types = ["map", "mode"];
|
||||
|
||||
foreach (type in types)
|
||||
{
|
||||
foreach (index in GetArrayKeys(level.mapvote["hud"][type + "s"]))
|
||||
{
|
||||
level.mapvote["hud"][type + "s"][index] destroy();
|
||||
}
|
||||
}
|
||||
|
||||
foreach (player in GetHumanPlayers())
|
||||
{
|
||||
foreach (type in types)
|
||||
{
|
||||
foreach (index in GetArrayKeys(player.mapvote[type]))
|
||||
{
|
||||
player.mapvote[type][index]["hud"] destroy();
|
||||
}
|
||||
}
|
||||
|
||||
player.mapvote["help_message_hud"] destroy();
|
||||
}
|
||||
}
|
||||
else // custom games
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user