• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Custom dvar
#1
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!
  Reply
#2
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.
  Reply
#3
(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?
  Reply
#4
Sry, but what exactly is the whitelist?
  Reply
#5
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 Tongue
  Reply
#6
(07-19-2011, 12:27)Tomsen1410 Wrote: Sry, but what exactly is the whitelist?

Code:
// Whitelisted Dvars & Commands
setmoddvar scr_disable_hardscope
  Reply
#7
finally now it works -.- Thank you guys Big Grin
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Black Ops 2 Custom background? jotape99 10 11,615 10-29-2013, 07:22
Last Post: xInfinity.
  Custom xanims DidUknowiPwn 8 6,668 08-28-2013, 08:17
Last Post: RaZ
  Help Make ac130 shoot custom bullets Ra3shed 0 2,553 07-23-2013, 13:02
Last Post: Ra3shed
  [Tutorial] Custom gametype HUD iAegle 17 14,163 07-14-2013, 01:16
Last Post: Nekochan
Video Custom Facepaints? Cuddlyedits 5 4,146 07-01-2013, 14:58
Last Post: iPaddie
  Help dedicated servers and custom dvars mattyman 0 2,340 06-22-2013, 07:33
Last Post: mattyman
  [Release] -InSaNe-'s DVAR Console dylankrajewski 41 23,043 06-16-2013, 14:50
Last Post: lark
Information [Tutorial] Adding DLC Maps as Custom Maps. Nekochan 151 137,473 05-25-2013, 01:05
Last Post: Nero Z zero
  QS Mod by GeKKo v 6.5 with Custom Maps GeKKoFL0X 35 28,649 05-21-2013, 19:30
Last Post: [HARD] Tony.
  [Request] custom gun mod ColorCorrects 2 2,923 05-18-2013, 22:19
Last Post: mitchhacker

Forum Jump:


Users browsing this thread: 1 Guest(s)