.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   HL Engine Mapping (http://forums.bots-united.com/forumdisplay.php?f=20)
-   -   Server Commands (http://forums.bots-united.com/showthread.php?t=1390)

dead bwoy 16-04-2004 11:58

Server Commands
 
How do you get a map to run a cfg file running server commands? (Special rules for the map)

SoUlFaThEr 16-04-2004 12:53

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?

Pierre-Marie Baty 16-04-2004 14:28

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 :)

dead bwoy 16-04-2004 21:10

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.

Terran 16-04-2004 23:02

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 ;).

dead bwoy 16-04-2004 23:41

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

Terran 17-04-2004 09:31

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...

dead bwoy 17-04-2004 10:26

Re: Server Commands
 
Quote:

- remove the bot specific part leaving only the hooking stuff (or is this already available somewhere?)
- add some code to load map specific configs
Would this be very time consuming? Could someone let me know what I need to keep? I'll need to know what to add as well, but lets just take this one step at a time.
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?

Terran 17-04-2004 10:44

Re: Server Commands
 
You would use it instead of metamod or a bot with all implications this will produce.

Pierre-Marie Baty 17-04-2004 12:38

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.