rtxa / agmodx

AG Mod X is an improved Mini AG alternative made as a plugin for AMX Mod X from the ground. It's easy to add new stuff, make improvements, do changes, etc.
GNU General Public License v3.0
22 stars 9 forks source link

Execute server.cfg on map change #26

Open rtxa opened 1 year ago

rtxa commented 1 year ago

Currently this is not working, but with old HL builds this was the normal behavaiours.

This is causing problems with the server when a password is set with sv_password (Most of the time for a match) and the password not getting reset on map change.

One of the solutions that come in my mind is to set mapchangecfgfile server.cfg in startup_server.cfg.

Possible problems:

  1. Server owners sometimes replaces these CFGs with their own ones, then losing the settings. In any case, we should set this cvar with server_exec() to default from the AMXX plugin at server startup only.

Make clear that the cfg runs every changelevel to reset things like password, etc.

  1. We can check the value from the plugin itself and then execute server.cfg by default if it hasn't been set.