executing a cfg through menu.


(ChimTea) #1

Hi,

I’m having a small problem that I can’t seem to fix.

My menu has a button that would output a cfg that would echo something. I know how to execute it if the cfg is in the pk3 file:

But the cfg is in the mod directory. So it would output 'couldn’t exec maps.cfg

server directory:

jaymod/maps.cfg

pk3 file

ui/maps_confirm.menu

	BUTTON( SUBWINDOW_X+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, "YES?", .3, 14, close h2o_maps_confirm ; exec "exec maps.cfg" )

My guess, it’s something really simple or it’s not possible.

Say if I’m not making sense somewhere.


(Indloon) #2

Put the cfg into the mod pak file.


(ChimTea) #3

I don’t want to do that. If I do that I’ll have to upload the pk3 again if I change rotation.

maps.cfg should stay in jaymod directory


(phisherman) #4

This maps.cfg you’re trying to execute, is it stored on server or client side? With UIscript, it’s impossible to do anything on server side, so I assume it’s on client side, but if you say the cfg is not in your pk3, how are you planning to distribute it to the clients?

//Also, if possible, post some example content of this cfg, I can’t figure out the intention behind all this…


(ChimTea) #5

[QUOTE=Phishermans Phriend;393118]This maps.cfg you’re trying to execute, is it stored on server or client side? With UIscript, it’s impossible to do anything on server side, so I assume it’s on client side, but if you say the cfg is not in your pk3, how are you planning to distribute it to the clients?

//Also, if possible, post some example content of this cfg, I can’t figure out the intention behind all this…[/QUOTE]

Well, the first thing you said. The file is stored server side, but I tested it on local machine first, and that worked. So I figured it could work on-line as well.

The cfg is just a simple list of maps running on the server. And since custom commands are impossible on jaymod (except enhmod) I wanted to make a button that would execute the maps.cfg server side.

So if this doesn’t work I’m out of my Latin ^^


(Crytiqal) #6

well you could just make a bind with rcon <pw> exec maps.cfg ?


(phisherman) #7

[QUOTE=Crytiqal;393285]well you could just make a bind with rcon <pw> exec maps.cfg ?[/QUOTE]And give away the rcon password by putting it into the menu file?

@sxweet
Without custom commands, the only thing you could use is lua (if supported). Apart from that, I don’t know any other possibilities.


(Patriotqube) #8

hmmm

not sure what your asking for but if the reason you want this is because you wants to have special cfgs. for some maps, why not just put this line in server.cfg

set g_mapConfigs “mapconfigs”

then make a file in there called default.cfg with all the settings you normally uses
and make mapspecific files like radar.cfg with the settings you want special for this map?

it works on jaymod - page 144 in Jaymod manual 2.2.0


(ChimTea) #9

Yeah I already put mapconfigs together with mapscripts, for example, I put purefrag timelimit to 20 instead of 60.

I’m hoping jaymod would almost support lua by now, but they’re previous release was in march last year. I’ve seen a topic that they would have a 2.3.0 beta version with LUA, praise the lord if they do it. I would be much happier with jaymod.

I think this topic can be closed, cause I don’t think there is any solution for now.


(Patriotqube) #10

should work with custom map.cfg’s tho

what is it exactly that you would like to change with that maps.cfg?