Raised This Month: $12 Target: $400
 3% 

[L4D2] SendConVarValue() not working..?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Carl Sagan
Senior Member
Join Date: Jan 2014
Old 10-13-2014 , 16:52   [L4D2] SendConVarValue() not working..?
Reply With Quote #1

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:

PHP Code:
new Handle:hTongueRange FindConVar("tongue_range");
SendConVarValue(clienthTongueRange"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?
Carl Sagan is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-13-2014 , 17:02   Re: [L4D2] SendConVarValue() not working..?
Reply With Quote #2

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 ?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Carl Sagan
Senior Member
Join Date: Jan 2014
Old 10-13-2014 , 17:04   Re: [L4D2] SendConVarValue() not working..?
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
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.
Carl Sagan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode