How to make a Dvar for Black Ops 2?

herSnimax

Member
Messages
9
Reaction score
3
Points
8
Hello everyone, good day, I want to do a Dvar to modify the difficulty of bots in gun games, snipers, etc., I am very new to this, the little thing I informed myself is writing some programming, but I don't know which application to use To do it, what language is used and finally how to compile it, I spent a lot of research doing it but I can't find how to do it, please ask me to share your knowledge colleagues, thank you very much and happy new year.
 

CF4_99

Veteran
Messages
145
Reaction score
56
Points
888
SetDvar(" bot_difficulty", 0);

0 - easy
1 - normal
2 - hard
3 - veteran
 

bubblewrap

New Member
Messages
2
Reaction score
0
Points
1
Please, Log in or Register to view URLs content!
Lookup on youtube or google how to get started with GSC Studio. If you have any questions, message me on discord: CF4_99#9826

Hi, I compiled and ran this

Code:
init()
{   
    SetDvar(" bot_difficulty", 0);
    Print("hello");
}

and I put it in the AppData\Local\Plutonium\storage\t6\scripts\mp folder

it did output hello to the console

but the bot_difficulty stayed set to 1

Is there anything else I need to do to set a dvar from gsc?

thanks
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,093
Reaction score
2,881
Points
1,103
Hi, I compiled and ran this

Code:
init()
{  
    SetDvar(" bot_difficulty", 0);
    Print("hello");
}

and I put it in the AppData\Local\Plutonium\storage\t6\scripts\mp folder

it did output hello to the console

but the bot_difficulty stayed set to 1

Is there anything else I need to do to set a dvar from gsc?

thanks
Maybe it's the space. Can you try this SetDvar("bot_difficulty", 0);?
 

bubblewrap

New Member
Messages
2
Reaction score
0
Points
1
Maybe it's the space. Can you try this SetDvar("bot_difficulty", 0);?
Hi thanks for the response

I tried

Code:
init()
{  
    SetDvar("bot_difficulty", 0);
    Print("hello");
}

but it did not change the bot_difficulty setting.

To clarify, I also ran the following code:

Code:
beginVal = getDvar( "bot_difficulty" );   
Print ("beginVal " + beginVal);

setDvar( "bot_difficulty", 3 );

afterVal = getDvar( "bot_difficulty" );
Print ("afterVal " + afterVal);

The output printed indicated that the dvar HAD been changed to 3. However, when I checked the dvar by opening the console and typing bot_difficulty, it indicated that bot_difficulty was still set to 1.

So I don't know what is going on, the gsc thinks the dvar is getting changed, but the console doesn't think so


Thanks
 
Last edited:
Top