MUTATOR_CALLHOOK(ClientConnect, this);
+ if (player_count == 1)
+ localcmd("\nsv_hook_firstjoin\n");
+
if (IS_REAL_CLIENT(this) && !IS_PLAYER(this) && !autocvar_g_campaign)
CS(this).motd_actived_time = -1; // the welcome message is shown by the client
}
player_powerups_remove_all(this); // stop powerup sound
ONREMOVE(this);
+
+ if (player_count == 0)
+ localcmd("\nsv_hook_lastleave\n");
}
void ChatBubbleThink(entity this)
set minplayers 0 "fill server with bots to reach this number of players in teamless games (if bot_number is not enough)"
set minplayers_per_team 0 "fill server with bots to reach this number of players per team (if bot_number is not enough)"
+// executed when the first player joins or the last player leaves
+alias sv_hook_firstjoin
+alias sv_hook_lastleave
+
// restart server if all players hit "ready"-button
set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"