Question on setting client vars

Topic created ยท 2 Posts ยท 60 Views
  • hey bud, quick question. any way to set client dvars? i tried gsc.setclientdvar but crashes the server. tried player.setdvar and player.setcleintdvar with no luck. biggest problem being that these dvars are cheat protected. and i really dont wanna keep sv_cheats on, on the server side. not a good idea haha

  • @Meet-Your-Maker

    For client

    player.setClientDvar("dvar_name", "value");
    

    or

    player.setClientDvars("dvar_name1", "value1", "dvar_name2", "value2"); // but you can add over 2 dvars
    

    but i cant call setclientdvar on plutonium IW5 =(

    For server(global dvar)

    gsc.setDvar("dvar_name", "value");
    

    I wrote small code for changing protected dvars and got hight jump ๐Ÿ˜ƒ

    level.onNotify("prematch_done", fun(args){
    	gsc.setDvar("sv_cheats", "1");
    	gsc.setDvar("jump_disableFallDamage", "1");
    	gsc.setDvar("jump_height", "500");
    	
            // down better to remove or commented...
    	setTimeout(fun() { gsc.setDvar("sv_cheats", "0"); }, 500);
    	
    });
    

    EDITS:
    Hm... thats dont work on server without password...

Log in to reply