[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Progs.dat can read client's vars?

Progs.dat can read client's vars?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Progs.dat can read client's vars?

Postby ChOwW » Thu Mar 08, 2012 12:35 am

ChOwW
 
Posts: 21
Joined: Sat Dec 03, 2011 1:20 pm

Re: Progs.dat can read client's vars?

Postby frag.machine » Thu Mar 08, 2012 1:29 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Progs.dat can read client's vars?

Postby Spike » Thu Mar 08, 2012 3:29 am

theres two ways to do it.
1: csqc.
2: krimzon_sv_parseclientcommand and cvar expansion - stuffcmd(player, "cmd clientcvar $cvarname\n");
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Progs.dat can read client's vars?

Postby ChOwW » Thu Mar 08, 2012 10:56 am

ChOwW
 
Posts: 21
Joined: Sat Dec 03, 2011 1:20 pm

Re: Progs.dat can read client's vars?

Postby Cobalt » Thu Mar 08, 2012 6:52 pm

Afaik, there is no way to do this in plain vanilla qc. There were some other kinds of code that I saw years ago regarding the big endian architecture
that can compile in regular QC and they were used to blank out the IP addresses in the status command.....but not sure if they can do stuff like this or not. In legacy ctfbot, there is a feature called : ' Fixed FOV ' which when is set, merely uses stuffcmd to place the clients fov setting to be 90 in either post think or prethink for the player. CSQC may be a better way of accomplishing your requirements though.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Progs.dat can read client's vars?

Postby Seven » Thu Jul 26, 2012 9:29 pm

Last edited by Seven on Thu Jul 26, 2012 9:53 pm, edited 1 time in total.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Progs.dat can read client's vars?

Postby Baker » Thu Jul 26, 2012 9:49 pm

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Progs.dat can read client's vars?

Postby Spike » Thu Jul 26, 2012 10:00 pm

stuffcmd(self, "this string has a \" in it");


stuffcmd has no return value. like I said, you need to use KRIMZON_SV_PARSECLIENTCOMMAND in order to read it, which will only happen after a delay, because it needs to basically bounce off the client before the server can actually see the response. QC does not have blocking calls like that, it would be too easy to exploit.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Progs.dat can read client's vars?

Postby Seven » Fri Jul 27, 2012 8:09 am

Thank you Baker for your suggestion.
Where would I use these alias lines ? Is this inside QC or autoexec ? I have not seen such line formats yet...

If your method (which I still not fully understood) can only restore the original cvar setting after map change,
it would not be good, because then all other original Quake´s centerprint messages in that map would also last 10 sec.


Hello Spike,
I was hoping that you could maybe tell me how to make use of KRIMZON_SV_PARSECLIENTCOMMAND in this context. I never made use of this extension before and dont know how it works.
I am a person who needs to see an example to learn it and beeing able to convert it to different things.
That makes it sometimes hard using a new extension without knowing how the syntax in a used condition is.

Thank you all for your help and efforts.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Progs.dat can read client's vars?

Postby Baker » Fri Jul 27, 2012 10:31 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Progs.dat can read client's vars?

Postby Spike » Fri Jul 27, 2012 10:43 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Progs.dat can read client's vars?

Postby Seven » Sat Jul 28, 2012 7:30 am

Thank you very much Spike and Baker for your detailed answers.
I now understand that it is in general not a good idea to try to read client cvars from the server side.
That is why QC-mods should not mess with client cvars at all.
I will rethink my idea and most probably skip it.

Thank you again for your lessons.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Progs.dat can read client's vars?

Postby Baker » Sat Jul 28, 2012 9:19 pm

Seven, the "right" way to do what you want to do here.

Centerprint it 3 times, 2.9 seconds apart. Then you don't have to mess with anyone's cvars. And if they have a dumb scr_centerprinttime value like 1, that's on them.

[Or find some other way to display your message. Or eliminate the idea entirely :D Maybe you should say what this idea is?]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Progs.dat can read client's vars?

Postby Seven » Sun Jul 29, 2012 8:22 am

Hello Baker,

yes, I also thought about why not use a small function with a centerprint loop and a nextthink value to cover the 10 sec.
But I thought that centerprints bring automagically that "notify" sound with them. Just like the one from the start map skill settings message.
It always "beeps" :)
But then I looked into the maps ent file and discovered that the sound is not engine sided hardcoded to centerprints.
There are even 3 possible sounds available.
Default is without sounds, so this "workaround" should be an easy way for doing it.
Thank you for your suggestion Baker.

It has something to do with the "small mod compilation". A SSQC sided version of a map introduction text.
But the more I think about it, the more I think that this would annoy people.
Maybe I should switch to bprint instead (which is only visible in console for the interested user).
But who knows for which other purpose this thing will end...
Anyhow, it helped me to learn a bit more about QC. And that was defenitely worth the trouble.
Thank you again Spike and Baker for sharing your knowledge to the ones in need.

Best wishes,
Seven
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Progs.dat can read client's vars?

Postby Seven » Wed Aug 22, 2012 6:58 pm

Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 3 guests