PDA

View Full Version : [L4D2] SendConVarValue() not working..?


Carl Sagan
10-13-2014, 16:52
So for some reason I never knew about the SendConVarValue() function and I was very excited to try it out, but I can't seem to get it to work.

Here's what I have:

new Handle:hTongueRange = FindConVar("tongue_range");
SendConVarValue(client, hTongueRange, "2000");

I've tried returning the value (true or false) and it returns true every time, but the client doesn't have their smoker tongue range increased.

Any ideas?

Powerlord
10-13-2014, 17:02
SendConVarValue is used to lie to clients about the value of a cvar. While you're telling clients it's set to 2000, the server still enforces the previous value.

If you just want to change it, why not use SetConVarInt ?

Carl Sagan
10-13-2014, 17:04
SendConVarValue is used to lie to clients about the value of a cvar. While you're telling clients it's set to 2000, the server still enforces the previous value.

If you just want to change it, why not use SetConVarInt ?

I'm trying to increase the range for specific clients, not all of them.