AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Is there a way to make certain cvars be executed when a map ends? (https://forums.alliedmods.net/showthread.php?t=324516)

Diddley4209 05-18-2020 13:27

Is there a way to make certain cvars be executed when a map ends?
 
On one of my maps I'd like nospread, but I don't want nospread in any other map, what would be the easiest way to do this?

DJEarthQuake 05-18-2020 13:43

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by Diddley4209 (Post 2700878)
On one of my maps I'd like nospread, but I don't want nospread in any other map, what would be the easiest way to do this?

For each map, you can also add a configuration file that will execute when the map loads. This is useful to set certain settings for 3rd party maps, say, removing the freeze time on fy_iceworld.

To do this, simply create a folder in addons\amxmodx\configs called "maps" and place a .cfg file named after the map with the settings in it, for example, you might have addons\amxmodx\configs\maps\fy_iceworld.cfg.

Otherwise to do it at 'the end', make a regular config file like server.cfg. Create plugin with Set_task_ex with flag SetTask_BeforeMapChange.

Diddley4209 05-18-2020 13:59

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by DJEarthQuake (Post 2700879)
For each map, you can also add a configuration file that will execute when the map loads. This is useful to set certain settings for 3rd party maps, say, removing the freeze time on fy_iceworld.

To do this, simply create a folder in addons\amxmodx\configs called "maps" and place a .cfg file named after the map with the settings in it, for example, you might have addons\amxmodx\configs\maps\fy_iceworld.cfg.

Otherwise to do it at 'the end', make a regular config file like server.cfg. Create plugin with Set_task_ex with flag SetTask_BeforeMapChange.

Yeah, I have these set in the map config, but they don't change when the map switches. I'm still new to source servers, so how would I create this "plugin" with that flag?

OciXCrom 05-18-2020 14:19

Re: Is there a way to make certain cvars be executed when a map ends?
 
You can set them in configs/amxx.cfg if you want to reset them after the map. This will be executed for each map, but the map-specific files will be executed after this one, so the cvars there will apply only for those maps.

Diddley4209 05-18-2020 15:18

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by OciXCrom (Post 2700887)
You can set them in configs/amxx.cfg if you want to reset them after the map. This will be executed for each map, but the map-specific files will be executed after this one, so the cvars there will apply only for those maps.

I don't have that file

OciXCrom 05-18-2020 16:08

Re: Is there a way to make certain cvars be executed when a map ends?
 
How can you not have it? This is a default AMXX file. If you didn't download AMXX from the official website, please download it. If you did, simply create the file.

Diddley4209 05-18-2020 16:10

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by OciXCrom (Post 2700904)
How can you not have it? This is a default AMXX file. If you didn't download AMXX from the official website, please download it. If you did, simply create the file.

What is AMXX? Sorry I'm confused haha

tarsisd2 05-18-2020 18:10

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by Diddley4209 (Post 2700905)
What is AMXX? Sorry I'm confused haha

what is amxx? really? what are you doing on this forum? did you say you are new to Source Server? so why did you post in the amx sections?

make up your mind of what you want

fysiks 05-18-2020 22:19

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by Diddley4209 (Post 2700905)
What is AMXX? Sorry I'm confused haha

AMXX is short for AMX Mod X, a server-side modification for Half-Life 1 based servers (which is the section of the forum in which you are now posting). If you have a Source-based game, you need to use SourceMod which as its own section for support (below the AMX Mod X section on the main page).

Diddley4209 05-19-2020 01:43

Re: Is there a way to make certain cvars be executed when a map ends?
 
Quote:

Originally Posted by tarsisd2 (Post 2700922)
what is amxx? really? what are you doing on this forum? did you say you are new to Source Server? so why did you post in the amx sections?

make up your mind of what you want

Oh yikes my bad, I didn't mean to post it in this forum. I figured out how to do what I needed, sorry about the confusion.


All times are GMT -4. The time now is 21:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.