PDA

View Full Version : [COD2] Changing map and gametype at the same time



cropek
26th June 2014, 13:53
Hello all!

I am working on my own in-game rcontool for CoD2 v1.3. I want to include the map and gametype settings which would allow to change map and gametype at the same time and here's the problem: how to do that?

I already tried something like that:

/rcon g_gametype dm; map mp_carentan or /rcon map mp_carentan; g_gametype dm

but it does not work :(

Any ideas?

(sorry for bad english)

IzNoGoD
26th June 2014, 14:55
/rcon g_gametype dm; RCON map mp_carentan;

cropek
26th June 2014, 16:04
I doesn't work too.

IzNoGoD
26th June 2014, 22:02
did you try it like this:



/set a "rcon g_gametype dm; rcon map mp_carentan"
/vstr a


This works.

filthy_freak_
27th June 2014, 07:38
/rcon set g_gametype dm; rcon map mp_carentan;


or



/rcon set sv_maprotationcurrent "gametype dm map mp_carentan";
/rcon map_rotate;

IzNoGoD
27th June 2014, 08:29
set is only needed if the cvar in question isnt set yet. g_gametype is already set, thus there is no need for the set.

cropek
27th June 2014, 13:32
Thank you all for your responses.

Unfortunetly, all these commands mentioned above don't work.

@edit


/rcon g_gametype sd; map mp_harbor
This command works only in NON-DEDICATED server but I need it to work also on dedicated server :(

IzNoGoD
27th June 2014, 14:11
As most servers run with sv_floodprotect 1, you need to add some delay between the 2 commands:


/set a "rcon g_gametype dm; wait 300; rcon map mp_carentan"
/vstr a


This, on a 100 fps client, gives a delay of 3 seconds between the 2 commands, allowing the commands to be processed without getting caught in the floodprotection.

Alternatively you can write a script that reads a cvar every frame and does this for you, allowing for the commands to be processed script-wise and removing the 3s delay.

cropek
27th June 2014, 23:46
1. Setting up a LAN server
2. Typing:
\rcon set a "rcon g_gametype ctf; wait 300; rcon map mp_harbor"
3. Then typing:
\rcon vstr a
4. Result: nothing.

When I enter the same just without "rcon" in map section the server (LAN dedicated) switches only map - not gametype.

filthy_freak_
27th June 2014, 23:58
While ingame, press shift + ~ at the same time.

You should see something like this;
http://dmca.blob.core.windows.net/dmcawm/wmtbd4b75c/cod2-game-console.jpg

Now type your rcon command.

Does it return/show anything?

cropek
28th June 2014, 09:54
While ingame, press shift + ~ at the same time.
Not even funny.

While entering:

/rcon set a "rcon g_Gametype ctf; wait 400; map mp_trainstation"
/rcon vstr a
the server switches only map - not gametype.

Then console shows:

Server changing map mp_trainstation, gametype dm

While entering:

\rcon set b "\rcon g_gametype ctf; wait 400; rcon map mp_trainstation"
\rcon vstr b

there's no reaction neither from server nor from console.

Ni3ls
28th June 2014, 10:06
Not even funny.


Its no joke... You can see the full console then. It's a Linux server?
Then do
/rcon set a "rcon g_gametype ctf; wait 400; map mp_trainstation"
/rcon vstr a

So not g_Gametype but with small g

cropek
28th June 2014, 10:49
Its no joke... You can see the full console then.

After 6 years of playing this game I actually noticed this "trick".


So not g_Gametype but with small g

Are you kidding me? It doesn't really matter if the letters are big or small.

filthy_freak_
28th June 2014, 12:23
Not even funny.

http://www.thecaribs.com/wp-content/uploads/2014/05/1399572593_picardfacepalm.jpg

You're on your own then.

Ni3ls
28th June 2014, 13:04
Are you kidding me? It doesn't really matter if the letters are big or small.
Linux is case sensitive. If you know everything better than dont ask for help

IzNoGoD
28th June 2014, 13:37
1. Setting up a LAN server
2. Typing:
\rcon set a "rcon g_gametype ctf; wait 300; rcon map mp_harbor"
3. Then typing:
\rcon vstr a
4. Result: nothing.

Let me tell you why:

[QUOTE=IzNoGoD;10110]

/set a "rcon g_gametype dm; wait 300; rcon map mp_carentan"
/vstr a


Spot the difference?

IzNoGoD
28th June 2014, 13:39
Linux is case sensitive. If you know everything better than dont ask for help

Linux might be case-sensitive, but cod2 commands are automatically parsed to either lowercase or to case-insensitive. Only the filenames are case-sensitive and cod2 even fixes that for you, be it barely. Example:



JH\test::hello_world();


Only works if you have a folder called jh (not JH). jh\test::hello_world(); also works though.

Same goes for cvars.

Ni3ls
28th June 2014, 14:03
Linux might be case-sensitive, but cod2 commands are automatically parsed to either lowercase or to case-insensitive. Only the filenames are case-sensitive and cod2 even fixes that for you, be it barely. Example:



JH\test::hello_world();


Only works if you have a folder called jh (not JH). jh\test::hello_world(); also works though.

Same goes for cvars.
Hmm I had some errors with maps and functions I created with a Linux server. But good to know:)

cropek
29th June 2014, 22:59
Alright lads


\rcon g_gametype sd; wait 600; rcon map mp_carentan

It's working now. I just wonder why didn't it work yesterday O.o

Thank you all for your responses :) PEACE