Skip to content

Commit

Permalink
Merge pull request #27 from d3m37r4/changes-in-cvar-regg-_mapchange-_…
Browse files Browse the repository at this point in the history
…type

Small changes to regg map manager.
  • Loading branch information
d3m37r4 committed Dec 23, 2023
2 parents b913fdd + bc322cc commit 22aeb85
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions cstrike/addons/amxmodx/scripting/regg_mapmanager.sma
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ public ReGG_FinishPost(const killer, const victim) {
public MapChange() {
switch(VoteType){
case 0: {
new mapname[MAX_NAME_LENGTH];
ArrayGetString(gMapName, random(gMapNums), mapname, charsmax(mapname));
message_begin(MSG_ALL, SVC_INTERMISSION);
message_end();
engine_changelevel(mapname);
new next_map[MAX_NAME_LENGTH];
ArrayGetString(gMapName, random(gMapNums), next_map, charsmax(next_map));
intermission();
set_task(3.0, "delay_MapChange", 0, next_map, strlen(next_map) + 1);
}
case 1: {
server_cmd("mapm_start_vote");
Expand Down Expand Up @@ -102,3 +101,12 @@ stock bool:isValidMap(mapname[]) {

return false;
}

stock intermission() {
message_begin(MSG_ALL, SVC_INTERMISSION);
message_end();
}

public delay_MapChange(mapname[]) {
engine_changelevel(mapname);
}

0 comments on commit 22aeb85

Please sign in to comment.