script-dvar issue

Have questions about CoD4 mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
pcbouncer
CJ Fan
CJ Fan
Posts: 114
Joined: November 27th, 2012, 10:49 pm

script-dvar issue

Post by pcbouncer » June 25th, 2013, 5:46 am

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

megazor
CJ Worshipper
CJ Worshipper
Posts: 414
Joined: July 22nd, 2009, 3:02 am
Location: Russia, Vladivostok

Re: script-dvar issue

Post by megazor » June 25th, 2013, 8:24 am

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");

pcbouncer
CJ Fan
CJ Fan
Posts: 114
Joined: November 27th, 2012, 10:49 pm

Re: script-dvar issue

Post by pcbouncer » June 25th, 2013, 9:10 am

thanks alot! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests