Author Topic: set variable on server recoverable by clients  (Read 860 times)

Offline PowaBanga

  • Newbie
  • *
  • Posts: 12
    • View Profile
  • Rated:
set variable on server recoverable by clients
« on: May 29, 2017, 06:02:41 AM »
hi all,
I want just ask, if there is a way, to set any variable on server, that we can recover with the clients ?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1232
    • View Profile
  • Rated:
Re: set variable on server recoverable by clients
« Reply #1 on: May 29, 2017, 02:09:49 PM »
I'm not sure what you are asking. Can you explain in more detail?
What are you trying to do? Which mod are you trying to do it with?

"variables" can mean cvars (console variables) or configstrings (strings the server can communicate to clients).

Cvars can be server only, or client only, or server-info that can be communicated to clients but are very much limited by what can be communicated in a single serverinfo frame.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline PowaBanga

  • Newbie
  • *
  • Posts: 12
    • View Profile
  • Rated:
Re: set variable on server recoverable by clients
« Reply #2 on: May 29, 2017, 04:25:01 PM »
For exemple, in q2pro, we can do this :
map_override_path /folder/
So i want to communicate if the server change path to my client. (because I work on a release for dday on q2pro)

so i did that :
Code: [Select]
alias mode-ctc "map_override_path "mode/ctc/"; echo "ctc mode will be loaded to the next map, if it's existing for the current map""
alias mode-bed "map_override_path "mode/bed/"; echo "bed mode will be loaded to the next map, if it's existing for the current map""
mode-normal

soin server.cfg i want to put something like that
Code: [Select]
alias mode-ctc "map_override_path "mode/ctc/"; say "ctc mode will be loaded to the next map, if it's existing for the current map""; set sv_mode 1
alias mode-bed "map_override_path "mode/bed/";  say "bed mode will be loaded to the next map, if it's existing for the current map"; set sv_mode 2
for send echo in map's config file from the client like
Code: [Select]
if sv_mode == 1 then echo message1 else
if sv_mode == 2 then message2 else

do you understand ? If this variable is on 1 or 2   on the server,  the client will send a different message
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

 

Shogun

June 15, 2019, 08:10:43 PM
Whose Franlkin? Players aliasing this day in age. haha
 

quadz

June 10, 2019, 01:51:13 PM
More detailed look at Q2 RTX


https://www.youtube.com/watch?v=r9vXz9-C-AY
 

quadz

June 09, 2019, 07:47:06 PM

[BTF]Defiant!

June 08, 2019, 09:02:37 AM
Good video overview Quadz!
 

quadz

June 07, 2019, 03:08:21 PM
Reasonably informative Q2 Ray Tracing video:


https://www.youtube.com/watch?v=sFhc951RhfI
 

Shogun

June 07, 2019, 12:03:42 PM
I don't have the golden ticket.
 

quadz

June 06, 2019, 03:19:00 PM
Yes, if you're fortunate to have one of the new RTX video cards. (I don't, so I'm watching people stream raytraced Q2 on twitch instead.)
 

Shogun

June 06, 2019, 12:33:55 PM
So I can make my q2 experience better looking with a download???
 

quadz

June 06, 2019, 10:43:00 AM
Raytraced Q2 download/install instructions:

https://steamdb.info/patchnotes/3889015/
 

Zeppelin

June 06, 2019, 02:33:46 AM
rikwad that was a good epitaph! very kind of you!

Show 50 latest
Welcome, Guest. Please login or register.
June 27, 2019, 05:13:27 AM

Login with username, password and session length