set variable on server recoverable by clients

Topics relating to D-Day modeling/coding/skinning etc.

Moderator: Rab,d

Post Reply
User avatar
PowaBanga
Posts: 253
Joined: Wed Aug 12, 2009 5:25 am
Location: Belgium
Contact:

set variable on server recoverable by clients

Post by PowaBanga »

hi all,
I want just ask, if there is a way, to set any variable on server, that we can recover with the clients ?

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 my release for dday on q2pro)

so i did that :

Code: Select all

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 all

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 all

if sv_mode == 1 then echo message1 else
if sv_mode == 2 then message2 else
If this variable is on 1 or 2 on the server, the client will send a different message thanks to the map's configuration files.

Somebody can help me to understand how I can do that ?
You can join me on IRC : in irc.quakenet.org chan : #ddayhome or on Freenode, chan #ddaynormandy .
Do not hesitate to type my pseudo to highlight me.
Or open an issue on github to highligh me by mail.
RSS
Post Reply