Jump to content

Server messages


Recommended Posts

Posted

Im trying to set up Custom server messages ingame,

EX: Server: (message here)

But i want to set time on it as well, ive tried something like:

set vstr m101 "wait 5;svsay We hope you enjoy your stay!;set vstr m102"

set vstr m102 "wait 20;svsay Thanks for playing!;set vstr m101"

and it wouldnt work.

 

I was hoping to have messages that the server would broadcast at the start of the map, and near the end of the map, im no coder or programmer so im sure theres something im doing wrong.

EX: (5 minutes after the map starts) Server: Playing on FFA3, Next map in rotation is Sith Council v2

(5 minutes until map change) Server: Next map in rotation Sith Council v2 - Download the map from jkhub.org

 

I have tried "/rcon wait 3;svsay Hello" ingame and the server says Hello instanty. In console it says the server is not dedicated 

 

Ive seen this done before but i know im doing something wrong lol

Smoo likes this
Posted

You have a “set” in the first command that shouldn’t be there. You’re setting your second vstr with nothing after it, and then set it in your second line. Just remove the second “set” from the first line and the second one from the second line and it should work. 

Posted

ok so i tried:

set vstr s101 "wait 3;svsay Thanks for playing!;vstr m102

set vstr s102 "wait 85;svsay next map in 2 minutes"

 

But that didnt work either, I was hoping to do map sepcific messages so would i need to do something like:

set vstr m101 "map mp/ffa3;vstr s101;set nextmap vstr m102"

etc for each map?

Posted (edited)
On 10/23/2019 at 1:41 AM, Xavier said:

ok so i tried:

set vstr s101 "wait 3;svsay Thanks for playing!;vstr m102

set vstr s102 "wait 85;svsay next map in 2 minutes"

 

But that didnt work either, I was hoping to do map sepcific messages so would i need to do something like:

set vstr m101 "map mp/ffa3;vstr s101;set nextmap vstr m102"

etc for each map?

I believe you're still setting the vstr's wrong. I just took a look at my server.cfg for my server and here's an example of my main vstr's for map cycle:

set d1 "set g_gametype 0; set g_forcepowerdisable "163837" ; set g_weaponDisable "524279" ; map mp/ffa3 ; set nextmap vstr d2"
set d2 "set g_gametype 0; set g_forcepowerdisable "163837" ; set g_weaponDisable "524279" ; map mp/ffa2 ; set nextmap vstr d3"
set d3 "set g_gametype 0; set g_forcepowerdisable "163837" ; set g_weaponDisable "524279" ; map mp/ffa1 ; set nextmap vstr d4"
set d4 "set g_gametype 0; set g_forcepowerdisable "163837" ; set g_weaponDisable "524279" ; map mp/ffa5 ; set nextmap vstr d5"
set d5 "set g_gametype 0; set g_forcepowerdisable "163837" ; set g_weaponDisable "524279" ; map mp/ffa4 ; set nextmap vstr d1"
vstr d1

So if you are wanting to do what you explained in our original post, you'd probably need to do this:

set s101 "wait 120000;svsay We hope you enjoy your stay!;wait 5100000;svsay Next map in 5 minutes!;wait 5400000;svsay Thanks for playing!"
set m101 "map mp/ffa3;vstr s101;set nextmap vstr m102"
set m102 "map sithcouncilv2;vstr s101;set nextmap vstr m101"
vstr m101

So this is defining a vstr to do the messages after certain increments of time, which you can change. I assume each number is in minutes but I can't remember for sure. It's set to say "We hope you enjoy your stay!" 2 minutes after the map loads, then after 85 minutes it says "Next map in 5 minutes!", then at 90 minutes it says thanks for playing. This is all assuming your server has a time limit of 90 minutes. You'll need to adjust it to whatever limit you have set. Also, the m102 vstr is set to load the first one so it loops only two maps, so of course you can keep adding more, just adjust the vstr names if you copy and paste. So if you added another, it would be set m103 "map mp/ffa2;vstr s101;set nextmap vstr m104" and so on.

 

Also, make sure this is at the bottom of your server.cfg so that the vstr is the last thing that loads.

Edited by Circa
Corrected the wait times to be in milliseconds
Posted
Quote

////////////////////////////////////////////////
////////////////END OF JA+ CVAR SETTINGS////////
////////////////////////////////////////////////
exec jk2.cfg
exec vstr.cfg

set s101 "wait 1;svsay ^3Current map is ^2mp/duel5;wait 85;svsay ^3Next map is ^2t3_stamp ^7in ^55 Minutes.;wait 89;svsay ^1t3_stamp in 1 Minute!"
set s102 "wait 1;svsay ^3Current map is ^2t3_stamp;wait 85;svsay ^3Next map is ^2mp/ffa1 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ffa1 in 1 Minute!"
set s103 "wait 1;svsay ^3Current map is ^2mp/ffa1;wait 85;svsay ^3Next map is ^2mp/duel7 ^7in ^55 Minutes.;wait 89;svsay ^1mp/duel7 in 1 Minute!"
set s104 "wait 1;svsay ^3Current map is ^2mp/duel7;wait 85;svsay ^3Next map is ^2mp/siege_korriban ^7in ^55 Minutes.;wait 89;svsay ^1mp/siege_korriban in 1 Minute!"
set s105 "wait 1;svsay ^3Current map is ^2mp/siege_korriban;wait 85;svsay ^3Next map is ^2mp/ffa2 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ffa2 in 1 Minute!"
set s106 "wait 1;svsay ^3Current map is ^2mp/ffa2;wait 85;svsay ^3Next map is ^2mp/duel6 ^7in ^55 Minutes.;wait 89;svsay ^1mp/duel6 in 1 Minute!"
set s107 "wait 1;svsay ^3Current map is ^2mp/duel6;wait 85;svsay ^3Next map is ^2mp/ctf3 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ctf3 in 1 Minute!"
set s108 "wait 1;svsay ^3Current map is ^2mp/ctf3;wait 85;svsay ^3Next map is ^2mp/ffa4 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ffa4 in 1 Minute!"
set s109 "wait 1;svsay ^3Current map is ^2mp/ffa4;wait 85;svsay ^3Next map is ^2academy6 ^7in ^55 Minutes.;wait 89;svsay ^1academy6 in 1 Minute!"
set s110 "wait 1;svsay ^3Current map is ^2academy6;wait 85;svsay ^3Next map is ^2yavin2 ^7in ^55 Minutes.;wait 89;svsay ^1yavin2 in 1 Minute!"
set s111 "wait 1;svsay ^3Current map is ^2yavin2;wait 85;svsay ^3Next map is ^2mp/ffa5 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ffa5 in 1 Minute!"
set s112 "wait 1;svsay ^3Current map is ^2mp/ffa5;wait 85;svsay ^3Next map is ^2vjun3 ^7in ^55 Minutes.;wait 89;svsay ^1vjun3 in 1 Minute!"
set s113 "wait 1;svsay ^3Current map is ^2vjun3;wait 85;svsay ^3Next map is ^2t3_rift ^7in ^55 Minutes.;wait 89;svsay ^1t3_rift in 1 Minute!"
set s114 "wait 1;svsay ^3Current map is ^2t3_rift;wait 85;svsay ^3Next map is ^2mp/ffa3 ^7in ^55 Minutes.;wait 89;svsay ^1mp/ffa3 in 1 Minute!"
set s115 "wait 1;svsay ^3Current map is ^2mp/ffa;wait 85;svsay ^3Next map is ^2hoth3 ^7in ^55 Minutes.;wait 89;svsay ^1hoth3 in 1 Minute!"
set s116 "wait 1;svsay ^3Current map is ^2hoth3;wait 85;svsay ^3Next map is ^2mp/deul5 ^7in ^55 Minutes.;wait 89;svsay ^1mp/duel5 in 1 Minute!"

set m101 "map mp/duel5;vstr s101;set nextmap vstr m102"
set m102 "map t3_stamp;vstr s102;set nextmap vstr m103"
set m103 "map mp/ffa1;vstr s103;set nextmap vstr m104"
set m104 "map mp/duel7;vstr s104;set nextmap vstr m105"
set m105 "map mp/siege_korriban;vstr s105;set nextmap vstr m106"
set m106 "map mp/ffa2;vstr s106;set nextmap vstr m107"
set m107 "map mp/duel6;vstr s107;set nextmap vstr m108"
set m108 "map mp/ctf3;vstr s108;set nextmap vstr m109"
set m109 "map mp/ffa4;vstr s109;set nextmap vstr m110"
set m110 "map academy6;vstr s110;set nextmap vstr m111"
set m111 "map yavin2;vstr s111;set nextmap vstr m112"
set m112 "map mp/ffa5;vstr s112;set nextmap vstr m113"
set m113 "map vjun3;vstr s113;set nextmap vstr m114"
set m114 "map t3_rift;vstr s114;set nextmap vstr m115"
set m115 "map mp/ffa3;vstr s115;set nextmap vstr m116"
set m116 "map hoth3;vstr s116;set nextmap vstr m101"


//----------SERVER MAP LAUnCHING---------------
vstr m101

addbot alora
addbot desann
addbot reborn
addbot cultist

amforceteam -1 s

amrename alora ^2Clan
amrename desann ^3IP
amrename reborn ^4DISCORD^7-
amrename cultist ^5COME ^6JOIN ^4US^7!

This is what i did, this is straight from the cfg. the server starts on the CP but it shows its down on UU and i cant connect... 

Posted
14 hours ago, Xavier said:

This is what i did, this is straight from the cfg. the server starts on the CP but it shows its down on UU and i cant connect... 

Looks right to me. Although I have always added bots to the vstr's and set the bot names in botfiles. Not sure though, I've never ran a JA+ server, only basejka. Maybe someone else could help that uses JA+. @Raz0r @Aldro Koon @Nightwing @Jacobie

Posted

Pretty sure the wait time is in ms!

When you do any command with wait, I do believe that you wont be able to perform any other commands inbetween that wait. Meaning if you theoretically put a vstr that has a wait of say 5 minutes, and its running -- then the server wont accept any rcon commands (and maybe even admin commands) for 5 minutes until said vstr finishes. Using VSTR to do super long "waits" is probably not a good idea and not just for this reason, but I do believe it takes a toll on the server performance too. Dont quote me on all of this but it is what I have been led to believe based on experience although I have not actually investigated it thoroughly.

What you rather want is something that externally writes svsay after a given time. With Linux, you would have to use crontab to schedule it. But that is slightly bit more complicated than using JKA commands obviously.

So the easy alternative is to simply do message at the start of every map (in a vstr that lods the map, add a short wait time and drop the message you want there). But doing it for several minutes or hours is where I think you probably should reconsider. Once again not sure but I think thats the case.

 

Quote

This is what i did, this is straight from the cfg. the server starts on the CP but it shows its down on UU and i cant connect... 

Try bringing up the console and connect doing /connect 127.0.0.1:21000 or /connect 127.0.0.1:29070. Make sure your server is up on the CP or whatever you are using.

If that works, then its likely that your internet connection doesnt have open ports for JA/your NAT settings are restricted or there is some firewall preventing it from being publically hosted.

If that doesnt work, then your server isnt launching properly and we would probably need to see what your CP is saying to troubleshoot it. Preferably with /developer 1 or /developer 2 enabled on the server.

Posted

The server is hosted by bluefangsolutions.com I never had any issues connecting until I tried to put the svsay vstrs in the cfg. I took the vstrs out and it ran perfectly

Posted
14 hours ago, Xavier said:

The server is hosted by bluefangsolutions.com I never had any issues connecting until I tried to put the svsay vstrs in the cfg. I took the vstrs out and it ran perfectly

Try a few easier VSTRs and see if that works, then slowly work your way up instead of going all out instantly.

For example:

set s101 "wait 500;svsay ^3Current map is ^2mp/duel5"
set m101 "map mp/duel5;vstr s101"

Posted
Quote

set m101 "map mp/duel5;vstr s101;set nextmap vstr m102"
set m102 "map t3_stamp;vstr s101;set nextmap vstr m103"

set s101 "wait 600;svsay ^3Testing!"

 

I did this, and it worked on map change, showed up as soon as it I spawned in.

 

Is there a max wait time for JKA?

 

Posted
15 hours ago, Xavier said:

 

I did this, and it worked on map change, showed up as soon as it I spawned in.

 

Is there a max wait time for JKA?

 

If it's truly in milliseconds, then 600 is 0.6 of a second, so that makes sense. You'd want 6000 for 6 seconds or 60000 for 60 seconds.

Posted
2 hours ago, Circa said:

If it's truly in milliseconds, then 600 is 0.6 of a second, so that makes sense. You'd want 6000 for 6 seconds or 60000 for 60 seconds.

yeah, but when i set the wait to 60000 for 1 minute, it didnt work, so is there a max wait time?

 

Posted
20 minutes ago, Xavier said:

yeah, but when i set the wait to 60000 for 1 minute, it didnt work, so is there a max wait time?

 

I don't think so, but try a lower wait time and keep raising it to see how long you can make it.

Posted

eHeres the server.cfg

Quote

set m101 "map mp/duel5;vstr s101;set nextmap vstr m102"
set m102 "map t3_stamp;vstr s102;set nextmap vstr m103"
set m103 "map mp/ffa1;vstr s103;set nextmap vstr m104"
set m104 "map mp/duel7;vstr s104;set nextmap vstr m105"
set m105 "map mp/siege_korriban;vstr s105;set nextmap vstr m106"
set m106 "map mp/ffa2;vstr s106;set nextmap vstr m107"
set m107 "map mp/duel6;vstr s107;set nextmap vstr m108"
set m108 "map mp/ctf3;vstr s108;set nextmap vstr m109"
set m109 "map mp/ffa4;vstr s109;set nextmap vstr m110"
set m110 "map academy6;vstr s110;set nextmap vstr m111"
set m111 "map yavin2;vstr s111;set nextmap vstr m112"
set m112 "map mp/ffa5;vstr s112;set nextmap vstr m113"
set m113 "map vjun3;vstr s113;set nextmap vstr m114"
set m114 "map t3_rift;vstr s114;set nextmap vstr m115"
set m115 "map mp/ffa3;vstr s115;set nextmap vstr m116"
set m116 "map hoth3;vstr s116;set nextmap vstr m101"

set s101 "wait 900;svsay ^3Current map is ^2mp/duel5;wait 9000;svsay ^1TESTING!"
set s102 "wait 900;svsay ^3Current map is ^2t3_stamp;wait 9000;svsay ^1TESTING!"
set s103 "wait 900;svsay ^3Current map is ^2mp/ffa1;wait 9000;svsay ^1TESTING!"
set s104 "wait 900;svsay ^3Current map is ^2mp/duel7;wait 9000;svsay ^1TESTING!"
set s105 "wait 900;svsay ^3Current map is ^2mp/siege_korriban;wait 9000;svsay ^1TESTING!"
set s106 "wait 900;svsay ^3Current map is ^2mp/ffa2;wait 9000;svsay ^1TESTING!"
set s107 "wait 900;svsay ^3Current map is ^2mp/duel6;wait 9000;svsay ^1TESTING!"
set s108 "wait 900;svsay ^3Current map is ^2mp/ctf3;wait 9000;svsay ^1TESTING!"
set s109 "wait 900;svsay ^3Current map is ^2mp/ffa4;wait 9000;svsay ^1TESTING!"
set s110 "wait 900;svsay ^3Current map is ^2academy6;wait 9000;svsay ^1TESTING!"
set s111 "wait 900;svsay ^3Current map is ^2yavin2;wait 9000;svsay ^1TESTING!"
set s112 "wait 900;svsay ^3Current map is ^2mp/ffa5;wait 9000;svsay ^1TESTING!"
set s113 "wait 900;svsay ^3Current map is ^2vjun3;wait 9000;svsay ^1TESTING!"
set s114 "wait 900;svsay ^3Current map is ^2t3_rift;wait 9000;svsay ^1TESTING!"
set s115 "wait 900;svsay ^3Current map is ^2mp/ffa;wait 9000;svsay ^1TESTING!"
set s116 "wait 900;svsay ^3Current map is ^2hoth3;wait 9000;svsay ^1TESTING!"

//----------SERVER MAP LAUnCHING---------------
vstr m101

addbot alora
addbot desann
addbot reborn
addbot cultist

amforceteam -1 s

amrename alora ^2Clan
amrename desann ^3IP
amrename reborn ^4DISCORD^7-
amrename cultist ^5COME ^6JOIN ^4US^7!

So i recon, im the only one in the server, the bots didnt join. The first message popped up as i spawned into the server, some time passed and it said the second message, then all the bots joined, changed names, and everyone was forced to the spectator team XD

 

Posted
20 hours ago, Xavier said:

eHeres the server.cfg

So i recon, im the only one in the server, the bots didnt join. The first message popped up as i spawned into the server, some time passed and it said the second message, then all the bots joined, changed names, and everyone was forced to the spectator team XD

 

Looks like it all worked then, from what you put in there. Like I said before, bots should be added in your vstr if you want them to join at launch. Or put those before you launch the vstr. The vstr should be the very last thing in the server.cfg.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...