Forum

> > CS2D > Scripts > refreshing mod status
Forums overviewCS2D overview Scripts overviewLog in to reply

English refreshing mod status

2 replies
To the start Previous 1 Next To the start

old refreshing mod status

_oops
User Off Offline

Quote
I made the script that modifies the "mods_server.lst" file to toggle mods for specific gamemodes / maps.

so I thought that just changing the status value (assigning 1 next to the mod name in the file) of the existing mod and then changing the map would work but nah it didn't.

It wouldn't apply the change until I open the server settings panel and then hit the Okay button.

so the question is, are there any Lua commands related to applying the mod, something similar to the "loadweaponcfg" command which re-reads the weapons.cfg files and apply on the server.

or is there any other way to toggle the mod via script

old Re: refreshing mod status

JonyFrosta
User Off Offline

Quote
You have to restart the server completely to change the mod applied to it.
If you want change the server mod when you change the map, you could create a mechanism that automatically starts the server when you close it. And close the server when you change the map, like
os.close()

The server startup mechanism should be external, such as
python script
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview