Results 1 to 13 of 13
  1. #1
    Sn1p3rGT's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Amused

    Editing perks for Host only?

    How to make the following commands host only?

    [PHP]self setClientDvar( "perk_weapReloadMultiplier", "0.2" );
    self setClientDvar( "perk_fastSnipeScale", "20" );
    self setClientDvar( "perk_quickDrawSpeedScale", "20" );
    self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" ); [/PHP]

    I tried like this:
    [PHP]if(self.name == "MYNAME" ){
    self setClientDvar( "perk_weapReloadMultiplier", "0.2" );
    self setClientDvar( "perk_fastSnipeScale", "20" );
    self setClientDvar( "perk_quickDrawSpeedScale", "20" );
    self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" );
    }[/PHP]

    but to no avail
    Is it even possible? :S

  2. #2
    arnorerling's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Iceland
    Posts
    11
    Reputation
    10
    Thanks
    1
    My Mood
    Cold
    Try this
    Code:
    if( self isHost() ){ 
    self setClientDvar( "perk_weapReloadMultiplier", "0.2" ); 
    self setClientDvar( "perk_fastSnipeScale", "20" ); 
    self setClientDvar( "perk_quickDrawSpeedScale", "20" );  
    self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" );  
    }

  3. #3
    Sn1p3rGT's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    Tried that too, didn't work. :/

  4. #4
    Ju1cy's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    my house
    Posts
    39
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    What kind of error do you get?

  5. #5
    Sn1p3rGT's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    No error at all, but everyone gets the edited perks
    I also tried it like this

    [php]
    if(self.name == "MYNAME" ){
    uberhax0rz
    } else {
    perks_as_normal
    }[/php]

    but then it said bad syntax(If i remember it right), and I figured it was because I had 2 of the same commands(Might be wrong here).

  6. #6
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Put on OnplayerSpawn:

    Code:
    	if(self isHost())
    	{	
    		self thread SetallPerks();
    	}
    And then something like this. This gives you all your perks

    Code:
    SetallPerks() {
    self setClientDvar( "perk_weapReloadMultiplier", "0.2" );
    self setClientDvar( "perk_fastSnipeScale", "20" );
    self setClientDvar( "perk_quickDrawSpeedScale", "20" ); 
    self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" );  
    }
    Last edited by Yamato; 01-21-2011 at 10:50 AM. Reason: fail

  7. #7
    Ju1cy's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Location
    my house
    Posts
    39
    Reputation
    10
    Thanks
    4
    My Mood
    Inspired
    wow? you seriously filled in this:

    if(self.name == "MYNAME" ){
    uberhax0rz
    } else {
    perks_as_normal
    }

  8. #8
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		if(self.isHost) {
    		self setClientDvar( "perk_weapReloadMultiplier", "0.2" ); 
    		self setClientDvar( "perk_fastSnipeScale", "20" ); 
    		self setClientDvar( "perk_quickDrawSpeedScale", "20" );  
    		self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" );  
    		}
    	}
    }
    Last edited by jimmynguyen3030; 01-21-2011 at 03:24 PM.
    If I Helped You, Plz Thanks.
    It Would Help Alot

    What Do You Do For A Living?
    I Mostly Own Noobs With The AK-47 With Silencer
    What's That?
    (Turns To Friend)
    HAHAHA Noob!!!!!!

  9. #9
    Sn1p3rGT's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    @Ju1cy
    Apart from the name and the commands, yes I did. What's the problem?

    I was doing what Yamato said, which is the same as you all have suggested so far :/
    Last edited by Sn1p3rGT; 01-22-2011 at 02:43 PM.

  10. #10
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    probaly it wont work because other player need that dvar to if you put it in so make the dvars for normal and for host with a diffrent number then it should work

  11. #11
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,331
    My Mood
    Breezy
    Quote Originally Posted by jimmynguyen3030 View Post
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		if(self.isHost) {
    		self setClientDvar( "perk_weapReloadMultiplier", "0.2" ); 
    		self setClientDvar( "perk_fastSnipeScale", "20" ); 
    		self setClientDvar( "perk_quickDrawSpeedScale", "20" );  
    		self setClientDvar( "perk_bulletPenetrationMultiplier" , "8" );  
    		}
    	}
    }
    faill
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

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

    Boon Pek (01-23-2011)

  13. #12
    Boon Pek's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    188
    Reputation
    10
    Thanks
    378
    My Mood
    Inspired
    ^ agreed

    self isHost() is the proper way to do so, unless you declare .host in the first place :P
    My minecraft launcher!

    A full-featured, actively-developed windows-only Minecraft Launcher! It allows you to download older versions of minecraft.jar through the options menu, multi-username support, RAM allocation support, non-legit logins and more!











  14. #13
    Sn1p3rGT's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    0
    My Mood
    Amused
    I did use the one you said, but it didn't work. Everyone got the edited perks.