Author Topic: set variable on server recoverable by clients  (Read 1947 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 18, 2024, 02:55:33 PM
Quake 2 needs some pubic hair!

Sgt. Dick

April 17, 2024, 08:44:00 PM
This place is not what it used to be, but It can still be amusing at times  :D
 

Costigan_Q2

April 02, 2024, 07:49:21 AM
Quake 2 needs a public square.
 

|iR|Focalor

April 02, 2024, 06:38:09 AM
Deflection.
 

-Unh0ly-

April 02, 2024, 04:32:51 AM
 

Costigan_Q2

April 02, 2024, 03:22:32 AM
And now, as usual, we finally get to this pathetic buffoon, once again, pettily grasping at straws for any desperate tiny false 'victory' it genuinely believes it can win.
 

|iR|Focalor

April 02, 2024, 02:18:27 AM
"I freely admit to my faults but this degenerate can't even recognise his nevermind admit them."

I asked you why, and you only responded with "everyone's a sinner." That's less "freely admitting your faults" and more of a minimization of them. Just saying.
 

Costigan_Q2

April 02, 2024, 01:51:31 AM
I freely admit to my faults but this degenerate can't even recognise his nevermind admit them. :)

He'll never learn, just like Beaver...
 

Costigan_Q2

April 02, 2024, 01:30:11 AM
Yes, everyone's a sinner.

Didn't you know?

They've only banned my Costigan identity accounts. :)
 

|iR|Focalor

April 02, 2024, 01:24:14 AM
"Trolls get banned, that's universal"

I forget, maybe you can help me out... Which one of us is banned from Tastyspleen discord again? And why?

Show 50 latest
Welcome, Guest. Please login or register.
April 19, 2024, 02:22:13 PM

Login with username, password and session length