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

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 25, 2024, 12:57:19 PM

Login with username, password and session length