Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed

    Post Creat new Dvars...

    Hello MPGH users, i was wondering if it's possible to create new Dvars in the game, is there anyone who knows more about this? Have a nice day.

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Code:
    AddDvar(dvar,value)
    {
        SetDvarIfUninitialized(dvar,value);
    }
    Is from some functions I released a few days ago, you can find something in _utility.gsc too

  3. The Following User Says Thank You to Yamato For This Useful Post:

    [MOD5569]RU2056 (08-21-2011)

  4. #3
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    So, with that i should be possible to make new Dvars like r_wallhack 1 (wallhack on) r_wallhack 0 (wallhack off), should that work?

  5. #4
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,584
    Reputation
    11
    Thanks
    296
    My Mood
    Busy
    Why do that when you could use this:

    Code:
    doWH() 
    { 
       self endon("disconnect"); 
       self endon("death"); 
        
       self notifyOnPlayerCommand( "3", "+actionslot 3" ); 
    
       while( 1 ) 
       { 
          self waittill("3"); 
          self iPrintlnBold("^3WallHacks ^2ON"); 
          self ThermalVisionFOFOverlayOn();
    
           
          self waittill("3"); 
          self iPrintlnBold("^3WallHacks ^1OFF"); 
          self ThermalVisionFOFOverlayOff();
    
    
       wait 0.05; 
       } 
    }

  6. The Following User Says Thank You to cgallagher21 For This Useful Post:

    [MOD5569]RU2056 (08-21-2011)

  7. #5
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    AddDvar("oma","12");
    AddDvar("yamato","56");
    AddDvar("goodmorning","1");

    Examples, go in init()

  8. #6
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    Could you make a small script Yamato? I'm having problems making it work...

  9. #7
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by [MOD5569]RU2056 View Post
    Could you make a small script Yamato? I'm having problems making it work...
    I have said you how

  10. #8
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    Quote Originally Posted by Yamato View Post
    I have said you how
    I can't understand it very well, bad English sorry.

  11. #9
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    Yamato can be very hard to understand...

    But i don't think you can create a new one that you would be able to setDvar().

    But why would you make a new Dvar. For what use? I'm sure you can do it just with a thread.


    The lines in my Steam are i's

  12. The Following User Says Thank You to Nachos For This Useful Post:

    [MOD5569]RU2056 (08-21-2011)

  13. #10
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    Code:
    WallhackDvar()
    {
        SetDvarIfUninitialized("r_wallhack", "0");
    
    	if(getdvar("r_wallhack") == 1)
    	{
    		foreach(player in level.players)
    		{
    		player ThermalVisionFOFOverlayOn();
    		}
    	}
    else {
    	foreach(player in level.players)
    	{
    	player ThermalVisionFOFOverlayOff();
    	}
           }
    }
    Somenthing like that? lol
    (I wrote it in this box, so I have no idea if it works xD)

  14. The Following User Says Thank You to EpicPlayer For This Useful Post:

    [MOD5569]RU2056 (08-21-2011)

  15. #11
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by Nachos View Post
    Yamato can be very hard to understand...

    But i don't think you can create a new one that you would be able to setDvar().

    But why would you make a new Dvar. For what use? I'm sure you can do it just with a thread.
    You can use it in many ways, a good example is nukems code to control other players chat. With the new dvars you create, you can use them in console and that allows you to change different things quickly.

  16. #12
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    Quote Originally Posted by Yamato View Post
    You can use it in many ways, a good example is nukems code to control other players chat. With the new dvars you create, you can use them in console and that allows you to change different things quickly.
    I didn't knew that. That is actually quite cool!


    The lines in my Steam are i's

  17. #13
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    Thanks guys, perfect work!

    Quote Originally Posted by EpicPlayer View Post
    Code:
    WallhackDvar()
    {
        SetDvarIfUninitialized("r_wallhack", "0");
    
    	if(getdvar("r_wallhack") == 1)
    	{
    		foreach(player in level.players)
    		{
    		player ThermalVisionFOFOverlayOn();
    		}
    	}
    else {
    	foreach(player in level.players)
    	{
    	player ThermalVisionFOFOverlayOff();
    	}
           }
    }
    Somenthing like that? lol
    (I wrote it in this box, so I have no idea if it works xD)
    It doesn't work correctly, check the code pleas...
    Last edited by [MOD5569]RU2056; 08-21-2011 at 07:43 AM.

  18. #14
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    Quote Originally Posted by [MOD5569]RU2056 View Post
    Thanks guys, perfect work!



    It doesn't work correctly, check the code pleas...
    Hm?
    Do you get a error or somenthing?

  19. #15
    [MOD5569]RU2056's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    My Mood
    Relaxed
    Quote Originally Posted by EpicPlayer View Post
    Hm?
    Do you get a error or somenthing?
    I doesn't give an error or something, when i start the game the wallhack is already turned on, the script has made the dvar but it's not functioning.
    When i type in r_wallhack 0 the wallhack doesn't go off. Just check it out i can't explain it...

Page 1 of 2 12 LastLast

Similar Threads

  1. Creating New Objects DLL Need Help
    By SeptFicelle in forum C# Programming
    Replies: 6
    Last Post: 05-19-2011, 05:43 PM
  2. Can't Create New Acc
    By Synchromanica in forum Combat Arms Help
    Replies: 9
    Last Post: 10-05-2010, 02:54 PM
  3. Creating New REZ texture skins
    By heydiddlediddle in forum Combat Arms Mods & Rez Modding
    Replies: 2
    Last Post: 02-21-2010, 12:45 PM
  4. Somebody need to create new hack
    By Cro-Hero in forum CrossFire Hacks & Cheats
    Replies: 7
    Last Post: 06-11-2009, 03:19 PM
  5. Pls ! Create new tuto :'(
    By Kyle88 in forum WarRock Korea Hacks
    Replies: 0
    Last Post: 07-17-2007, 03:58 AM