I want to create my custom dvar and i do this
if(getDvarInt(#"scr_disable_hardscope") == "")
setdvar(#"scr_disable_hardscope", "0");
else if(getDvarInt(#"scr_disable_hardscope") > 1)
setDvar(#"scr_disable_hardscope", 1);
else if(getDvarInt(#"scr_disable_hardscope") < 0)
setDvar(#"scr_disable_hardscope", 1);
now how to change it from console? console say scr_disable_hardscope doesnt exist!
You need to make a whitelist config file in your mod directory and execute it in game or via script.
Make a .cfg file called mywhitelist.cfg and add the line(s):
setmoddvar your_dvar
setmoddvar your_dvar2
The dvars can be both custom or stock dvars. After this, add it to your zone file
rawfile,mywhitelist.cfg
Go in game, load a map and type /exec mywhitelist.cfg
Then you should be able to toggle the dvars via console.
(07-19-2011, 11:43)Phl3x_ Wrote: [ -> ]You need to make a whitelist config file in your mod directory and execute it in game or via script.
Make a .cfg file called mywhitelist.cfg and add the line(s):
setmoddvar your_dvar
setmoddvar your_dvar2
The dvars can be both custom or stock dvars. After this, add it to your zone file
rawfile,mywhitelist.cfg
Go in game, load a map and type /exec mywhitelist.cfg
Then you should be able to toggle the dvars via console.
mywhitelist:
// Whitelisted Dvars & Commands
setmoddvar scr_disable_hardscope
when im in game exec myWhitelist, console say exec whitelist from fastfile, when i try to use scr_disable_hardscope it say doesnt exist :| what i did wrong?
Sry, but what exactly is the whitelist?
Make sure:
You've added the line to your zone file
The file has a .cfg extension
When executing it, include the extension in the command "/exec MyWhitelist.cfg"
http://wiki.modsrepository.com/index.php...ting_Dvars
Whitelists simply allow dvars to be toggled via the console, I can't explain it anymore
(07-19-2011, 12:27)Tomsen1410 Wrote: [ -> ]Sry, but what exactly is the whitelist?
Code:
// Whitelisted Dvars & Commands
setmoddvar scr_disable_hardscope
finally now it works -.- Thank you guys