Author Topic: set variable on server recoverable by clients  (Read 1953 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: 1357
    • 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:

 

|iR|Focalor

April 24, 2024, 10:55:53 AM
omlette du fromage?
 

Admin

April 24, 2024, 07:08:22 AM
fin.
 

|iR|Focalor

April 22, 2024, 04:27:07 PM
Now it's over. Because I say it's over.
 

|iR|Focalor

April 22, 2024, 12:39:29 PM
It's over when I say it's over.

 

|iR|Focalor

April 22, 2024, 11:34:16 AM
Costigan needs a tampon.
 

Costigan_Q2

April 22, 2024, 02:53:12 AM
This interaction is over.
 

Costigan_Q2

April 22, 2024, 02:51:20 AM
Will someone please muzzle and leash that barking dog? it's projections and delusions and now endless babbling are comically pitiable, just treat it like you would Beaver - that's what it deserves.
 

Costigan_Q2

April 22, 2024, 02:50:50 AM
Quake 2 needs a public square.

This is not a debate.
 

|iR|Focalor

April 21, 2024, 05:36:24 PM
If you were attached to reality, you'd realize that.

Quake 2 needs a private bathroom.
 

|iR|Focalor

April 21, 2024, 05:34:35 PM
I've never doxed anyone like he did or sent them 1000's of annoying whiny angry messages in all caps like you.

Show 50 latest
Welcome, Guest. Please login or register.
May 02, 2024, 10:55:50 AM

Login with username, password and session length