I never worked much with CoD4, but in CoD2 it's just setcvar("foo", "test") and getcvar("foo")
I never worked much with CoD4, but in CoD2 it's just setcvar("foo", "test") and getcvar("foo")
timescale 0.01
I am getting a bit tired of having to repeat myself - you CANNOT - that means no, not, never - store strings in dvars once the server rotates.
I'll say it again - what you are attempting to do cannot be done in COD4 - once the server roates, all dvar strings are emptied of their values.
So, asking about reading a dvar is pointless given what you are attempting.
You will have to go back to storing stuff on players using the setStat()/getStat() functions, and checking to make sure they've been with the server through X number of rotations. And then get the stored values off them.
Last edited by Tally; 1st October 2015 at 19:37.
I just tested it fast, made link to iw3mp.exe and added +set dedicated 2
So cvar is clearly there, right? Or GSC cannot access them?Code:map mp_bog set foo 123 map_rotate foo ------> will print 123, as expected from CoD2
Edit: I just recalled the functions are named setdvar(key, value) and getdvar(key) in CoD4.
timescale 0.01