SRCDS Steam group


Changing server settings before map loads
#1
Question 
Ok, so I'll try to explain my problem as clear as possible. I run some servers for GoldenEye Source, and the maps come with "loadouts" (text files), that define the props in the map. Well I use both mani-mod and matties eventscripts with it at the moment, ES being the script to give people weapons. In the previous build of the mod, the weapon spawns crashed the server so a script was designed to give players weapons. The new patch is out, so a good 10/15 maps can work with the normal loadouts. Players still only spawn with nothing but a knife, so I have written another ES script to start players out with a pistol as well. Everything is good up until this point, mainly due to the fact that the 5 custom maps didn't come with original weapon loadouts. Therefore, I'd like to use the random weapon script on these maps.

So, the pistol ES script is called start_wpn, and the random weapon script is called rnd_wpn. On official maps Id like it to load the start_wpn script, and when its on custom maps Id like to the rnd_wpn script. (Custom maps came with no guns) So far I've tried to create mapname.cfg's with something like the following:

- official maps -
mattie_eventscripts 1
eventscripts_subdirectory events
es_unload rnd_wpn
es_load start_wpn
ge_startarmed 1

- custom maps -
mattie_eventscripts 1
eventscripts_subdirectory events
es_unload start_wpn
es_load rand_wpn
ge_startarmed 1

Whats weird is that if i start the server on cradle, an official map, it runs the start_wpn script fine. I switch to a custom, and the script switches fine to the rdn_wpn script. Then when I change back to official maps, the rnd_wpn script stays on and it wont switch back to the start_wpn script. I had the map cfg's in the mani mod map_config folder, and I also tried to put them in a "cfg" folder in the general maps directory, with no response coming from that. Someone told me that the script cant be changed like that the way I do it, being that Mani loads after the map itself loads..but its weird that it works the first time when i switch from an official map to a custom one. Any help or suggestions on this would greatly be appreciated, I came here first because this place seemed like it had quite a few intelligent people hanging around. Big Grin

Any help is always greatly appreciated, thanks!

Edu
Reply
#2
Thanks for the accurate explanation.

Did you make custom CFG's for the officials too? (I think you did, just checking)
What happens when you do es_unload rnd_weapon and after that es_load start_wpn when the map changed from custom to official?
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)