[Tutorial] Edit Dvars in-game

View previous topic View next topic Go down

[Tutorial] Edit Dvars in-game

Post by Sir Jake on Sun Mar 07, 2010 4:04 am

You can change the dvar and the value you want to increase or decrease to whatever you want

You need to add

Code:
self thread increaseDvar()
;self thread decreaseDvar();
to onPlayerSpawned() or where ever you want to call it from


Code:
increaseDvar(){     
 self endon ( "disconnect" );     
 self endon ( "death" );     
 self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );       
 self waittill( "dpad_up" );     
 value = getDvarInt( "g_speed" ); //gets dvar value       
value = value + 20; //increases dvar value by 20(change 20 to whatever you want)       
setDvar( "g_speed", value ); //sets dvar     
 self iPrintlnBold( "g_speed = ", value );       
self thread increaseDvar();}decreaseDvar(){        self endon ( "disconnect" );        self endon ( "death" );        self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );        self waittill( "dpad_down" );        value = getDvarInt( "g_speed" );        value = value - 20; //decreases dvar value by 20(change 20 to whatever you want)        setDvar( "g_speed", value );        self iPrintlnBold( "g_speed = ", value );


      self thread decreaseDvar();

self endon ( "disconnect" );     
 self endon ( "death" );     
 self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );     
 self waittill( "dpad_down" );        value = getDvarInt( "g_speed" );     
 value = value - 20; //decreases dvar value by 20(change 20 to whatever you want)       
setDvar( "g_speed", value );     
 self iPrintlnBold( "g_speed = ", value );       
self thread decreaseDvar();}




Ninja'd From http://www.se7ensins.com

Sir Jake
Admin
Admin

Posts : 467
Join date : 2010-01-29
Age : 21

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by DJ Flipper on Mon Mar 08, 2010 12:02 am

No Ginger GirIs wrote:You can change the dvar and the value you want to increase or decrease to whatever you want

You need to add

Code:
self thread increaseDvar()
;self thread decreaseDvar();
to onPlayerSpawned() or where ever you want to call it from


Code:
increaseDvar(){     
 self endon ( "disconnect" );     
 self endon ( "death" );     
 self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );       
 self waittill( "dpad_up" );     
 value = getDvarInt( "g_speed" ); //gets dvar value       
value = value + 20; //increases dvar value by 20(change 20 to whatever you want)       
setDvar( "g_speed", value ); //sets dvar     
 self iPrintlnBold( "g_speed = ", value );       
self thread increaseDvar();}decreaseDvar(){        self endon ( "disconnect" );        self endon ( "death" );        self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );        self waittill( "dpad_down" );        value = getDvarInt( "g_speed" );        value = value - 20; //decreases dvar value by 20(change 20 to whatever you want)        setDvar( "g_speed", value );        self iPrintlnBold( "g_speed = ", value );


      self thread decreaseDvar();

self endon ( "disconnect" );     
 self endon ( "death" );     
 self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );     
 self waittill( "dpad_down" );        value = getDvarInt( "g_speed" );     
 value = value - 20; //decreases dvar value by 20(change 20 to whatever you want)       
setDvar( "g_speed", value );     
 self iPrintlnBold( "g_speed = ", value );       
self thread decreaseDvar();}




Ninja'd From http://www.se7ensins.com
Why would you copy and paste from a rival site?

DJ Flipper
Rookie
Rookie

Posts : 18
Join date : 2010-02-16
Age : 25
Location : Outside the paradox of reality

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir Jake on Mon Mar 08, 2010 10:15 am

Because thats the point of being a ninja

Sir Jake
Admin
Admin

Posts : 467
Join date : 2010-01-29
Age : 21

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by rwddrifter18 on Mon Mar 08, 2010 12:44 pm

does this work online or only split screen?

rwddrifter18
Come here often?
Come here often?

Posts : 91
Join date : 2010-01-23
Age : 26
Location : califorina

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir Jake on Tue Mar 09, 2010 7:51 pm

Online with a Jtag

Sir Jake
Admin
Admin

Posts : 467
Join date : 2010-01-29
Age : 21

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by natznutz on Sun Mar 14, 2010 2:27 pm

can u teech meee plzzzzzzzzzzz GT Mattyyy I

natznutz
Newbie
Newbie

Posts : 1
Join date : 2010-03-14

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir SW@GG@ on Wed Mar 17, 2010 7:59 pm

Dont even kno wat a D-var is kinds confused

Sir SW@GG@
Mod
Mod

Posts : 286
Join date : 2010-03-14
Age : 23
Location : ChinaTown

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir Jake on Thu Mar 18, 2010 6:38 pm

haha like the commands of what u want to do

Sir Jake
Admin
Admin

Posts : 467
Join date : 2010-01-29
Age : 21

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir SW@GG@ on Thu Mar 18, 2010 6:54 pm

Yo Ginger do u kno how to fo the teleport mod cuz ifu can inv Chillax DC. It would be much appreciated

Sir SW@GG@
Mod
Mod

Posts : 286
Join date : 2010-03-14
Age : 23
Location : ChinaTown

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sir Jake on Thu Mar 18, 2010 7:24 pm

Nah i dont bro sorry

Sir Jake
Admin
Admin

Posts : 467
Join date : 2010-01-29
Age : 21

Back to top Go down

Re: [Tutorial] Edit Dvars in-game

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum