Skip to content

Commit

Permalink
fix: render readyup message on a timer at half-time (playliga/applica…
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonpole committed Dec 17, 2024
1 parent 9444fdb commit 0c2f34f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 5 deletions.
Binary file modified config/csgo/addons/sourcemod/plugins/liga.smx
Binary file not shown.
6 changes: 4 additions & 2 deletions config/csgo/addons/sourcemod/scripting/liga.sp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason) {
// handle half-time
if(roundsTotal == roundsHalfTime) {
say("HALFTIME");
say("TO START THE SECOND-HALF TYPE: .ready");
CreateTimer(float(DELAY_HALF_TIME), Timer_HalfTime);
CreateTimer(float(DELAY_WELCOME_MESSAGE), Timer_WelcomeMessage);
CreateTimer(float(INTERVAL_WELCOME_MESSAGE), Timer_WelcomeMessage, 0, TIMER_REPEAT);
return Plugin_Continue;
}

Expand All @@ -249,8 +250,9 @@ public Action CS_OnTerminateRound(float &delay, CSRoundEndReason &reason) {
) {
overTime = true;
say("OVERTIME");
say("TO START OVERTIME TYPE: .ready");
CreateTimer(float(DELAY_HALF_TIME), Timer_HalfTime);
CreateTimer(float(DELAY_WELCOME_MESSAGE), Timer_WelcomeMessage);
CreateTimer(float(INTERVAL_WELCOME_MESSAGE), Timer_WelcomeMessage, 0, TIMER_REPEAT);
return Plugin_Continue;
}

Expand Down
Binary file modified config/cssource/addons/sourcemod/plugins/liga.smx
Binary file not shown.
Binary file modified config/cstrike/addons/amxmodx/plugins/liga.amxx
Binary file not shown.
10 changes: 7 additions & 3 deletions config/cstrike/addons/amxmodx/scripting/liga.sma
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define MENU_TEAM_SELECT_VGUI_T 26
#define TEAM_T 0
#define TEAM_CT 1
#define TIMER_WELCOME_MESSAGE_ID 1337

// cvars
enum cvars {
Expand Down Expand Up @@ -168,7 +169,7 @@ public command_ready(id) {
}

// execute the config
remove_task(id);
remove_task(TIMER_WELCOME_MESSAGE_ID);
server_cmd("competitive");

// run the lo3 task
Expand Down Expand Up @@ -240,8 +241,9 @@ public event_end_round() {
// handle half-time
if(rounds_total == rounds_half_time) {
say("HALFTIME");
say("TO START THE SECOND-HALF TYPE: .ready");
set_task(float(DELAY_HALF_TIME), "task_half_time");
set_task(float(DELAY_WELCOME_MESSAGE), "task_welcome_message");
set_task(float(INTERVAL_WELCOME_MESSAGE), "task_welcome_message", TIMER_WELCOME_MESSAGE_ID, "", 0, "b");
return PLUGIN_CONTINUE;
}

Expand All @@ -255,6 +257,8 @@ public event_end_round() {
say("TO START OVERTIME TYPE: .ready");
g_over_time = true;
set_task(float(DELAY_HALF_TIME), "task_half_time");
set_task(float(DELAY_WELCOME_MESSAGE), "task_welcome_message");
set_task(float(INTERVAL_WELCOME_MESSAGE), "task_welcome_message", TIMER_WELCOME_MESSAGE_ID, "", 0, "b");
return PLUGIN_CONTINUE;
}

Expand Down Expand Up @@ -285,7 +289,7 @@ public event_join_team() {

g_welcomed = true;
set_task(float(DELAY_WELCOME_MESSAGE), "task_welcome_message");
set_task(float(INTERVAL_WELCOME_MESSAGE), "task_welcome_message", id, "", 0, "b");
set_task(float(INTERVAL_WELCOME_MESSAGE), "task_welcome_message", TIMER_WELCOME_MESSAGE_ID, "", 0, "b");
return PLUGIN_CONTINUE;
}

Expand Down
Binary file modified config/czero/addons/amxmodx/plugins/liga.amxx
Binary file not shown.

0 comments on commit 0c2f34f

Please sign in to comment.