Server Commands
How do you get a map to run a cfg file running server commands? (Special rules for the map)
|
Re: Server Commands
i dont believe you can make a MAP exec a .cfg file on your server.
just make the cfg, get in the map, open console and do: exec myspecialcfg.cfg i am not aware of a map being able to control server commands or execute external files for server commands anyone else? |
Re: Server Commands
A very simple metamod plugin can be written that would do what you want. It's a matter of 5 minutes, possibly even less. I'm sure Mark would love writing something like this :)
|
Re: Server Commands
Is there any way to hack a map file's entities to run a server command without using metamod, like bot_add or mp_hostagepenalty 0. Like in a .res, .ent, .wad, .pak, or whatever. This will be used in a Single Player Game, so I dont even think metamod will work even if I wanted to use it.
|
Re: Server Commands
Go to www.metamod.org and look for the single player version of MetaMod.
Than go to www.amxmod.net and search for the plugin map_cfg... From your signature I assume you know how to get and install AMX ;). |
Re: Server Commands
The thing is:
I don't want to use metamod! Im working on a project for czero and I dont want to include metamod in the project. If there's no other way, I'll have to drop the idea... Would it be possible to create a simple plugin (non-metamod) that would only use the required functions to run a cfg file for a map of the same name? ie: have the plugin run de_dust.cfg when starting de_dust.bsp |
Re: Server Commands
Well, you could do it the hard way:
- grap the HPB Bot source code - remove the bot specific part leaving only the hooking stuff (or is this already available somewhere?) - add some code to load map specific configs This is like reinventing the wheel... |
Re: Server Commands
Quote:
Are there any whole files that can be removed? And this is for making a non-metamod plugin correct? Like I'd load it up in the target line or something like that? |
Re: Server Commands
You would use it instead of metamod or a bot with all implications this will produce.
|
Re: Server Commands
The only way to do this, as Terran says, is to create a hook DLL (like a bot, like metamod). That is, a DLL that you will specify in the liblist.gam instead of the czero DLL. That would require a minimum of coding skill, though.
In the HPB_bot template, for example, you need to keep engine.cpp, dll.cpp, linkfunc.cpp ; then you need to remove all third party code from all the functions in dll.cpp and engine.cpp and only let the engine calls happen, and add your config file parsing code in ServerActivate(). |
All times are GMT +2. The time now is 08:38. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.