Page 1 of 1

script-dvar issue

Posted: June 25th, 2013, 5:46 am
by pcbouncer
so in my script i have the following:

user setClientDvar("r_lightTweakSunColor", 0, 1, 1, 1);
(this is in RGBA format)

for some reason, only the first number parameter is used and the others are set to 0/ignored... so this would be 0 0 0 0.

user setClientDvar("r_lightTweakSunColor", 1, 1, 0, 1);

this would be 1 0 0 0

someone help, i cant figure out how to access the other parameters :s

Re: script-dvar issue

Posted: June 25th, 2013, 8:24 am
by megazor
Firstly, setClientDvar() is to be used with exactly two arguments.
Secondly, any dvar is a string-type object.

So, you should go with user setClientDvar("r_lightTweakSunColor", "0 1 1 1");

Re: script-dvar issue

Posted: June 25th, 2013, 9:10 am
by pcbouncer
thanks alot! :D