mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-20 04:55:43 +00:00
mapvote 1.1.1
Code refactor Doesn't add or change anything
This commit is contained in:
parent
ecf68810d2
commit
3d3a9c84bb
@ -456,9 +456,7 @@ ListenForEndVote()
|
|||||||
Print("[MAPVOTE] Rotating to " + mapName + " | " + modeName + " (" + modeDsr + ".dsr)");
|
Print("[MAPVOTE] Rotating to " + mapName + " | " + modeName + " (" + modeDsr + ".dsr)");
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdexec("load_dsr " + modeDsr);
|
DoRotation(modeDsr, mapName);
|
||||||
wait(0.05);
|
|
||||||
cmdexec("map " + mapName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetMapvoteData(type, elements)
|
SetMapvoteData(type, elements)
|
||||||
@ -581,7 +579,7 @@ OnKillcamEnd()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
wait GetDvarInt("mapvote_display_wait_time");
|
wait GetDvarInt("mapvote_display_wait_time");
|
||||||
DoRotation();
|
StartRotation();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -591,7 +589,7 @@ OnKillcamEnd()
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
wait GetDvarInt("mapvote_display_wait_time");
|
wait GetDvarInt("mapvote_display_wait_time");
|
||||||
DoRotation();
|
StartRotation();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -610,12 +608,17 @@ ShouldRotateDefault()
|
|||||||
|
|
||||||
RotateDefault()
|
RotateDefault()
|
||||||
{
|
{
|
||||||
cmdexec("load_dsr " + GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_modes"), ":")));
|
DoRotation(GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_modes"), ":")), GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_maps"), ":")));
|
||||||
wait(0.05);
|
|
||||||
cmdexec("map " + GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_maps"), ":")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DoRotation()
|
DoRotation(modeName, mapName)
|
||||||
|
{
|
||||||
|
cmdexec("load_dsr " + modeDsr);
|
||||||
|
wait(0.05);
|
||||||
|
cmdexec("map " + mapName);
|
||||||
|
}
|
||||||
|
|
||||||
|
StartRotation()
|
||||||
{
|
{
|
||||||
if (ShouldRotateDefault())
|
if (ShouldRotateDefault())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user