Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small changes to regg map manager. #27

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading