Results 1 to 7 of 7
  1. #1
    Stand em up
    Knock em down.

    Badge

    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
    Gamer IDs

    PSN ID: xRudyCrush Steam ID: rudyypoo

    Default [Help]Creating Script

    Hi, i've been recently trying to create a script for black ops, and i've done different things to the script, none have worked. I've been trying to fix it for like 3 days now and it's getting pretty annoying for just one script.

    zShox has been helping me, but still no luck.

    If you want to see what i'm making, it's a simple on/off dvar script, that I just can't get to work.

    The Script:
    Code:
    adsFreeze()
    {
    	self endon( "death" );
    	self endon( "disconnect" );
    	for(;;)
    	{
    		if( level.adsFreeze == false )
    		{
    			iPrintln( "Your ads has been frozen" );
    			self setCleintDvar( "player_adsExitDelay", 1 );
    		}
    		else
    		{
    			iPrintln( "Your ads has been unfrozen" );
    			self setClientDvar( "player_adsExitDelay", 0 );
    		}
    	}
    }
    Thanks, if you help.

    0 Not allowed! Not allowed!

  2. #2
    V.XVII.XIV Synix's Avatar
    Join Date
    Aug 2011
    Posts
    2,655
    Points
    2,314
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    2,655
    Points
    2,314
    Gamer IDs

    PSN ID: I-Synix-I

    Contact info:

    Kik Username: SynixMods

    Default

    self setCleintDvar( "player_adsExitDelay", 1 );

    Spelled Client wrong xD

    0 Not allowed! Not allowed!
    DM<3
    Instagram: @Synix_
    PSN: SKDM-
    Kik: SynixMods

  3. #3
    Blink 182 Give Me Boners mynameisjosh's Avatar
    Join Date
    Oct 2011
    Location
    Massoftwoshits
    Posts
    1,377
    Points
    3,110
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    Massoftwoshits
    Posts
    1,377
    Points
    3,110
    Gamer IDs

    Gamertag: JennaTollzZ PSN ID: HuuughGRection

    Default

    Well, for starters, "Cleint" is spelt wrong. ("Client")

    And, both the dvars are the same. How is it supposed to start on one thing and end with the same thing?

    0 Not allowed! Not allowed!
    Quote Originally Posted by Insane.Dragon View Post
    I fucked a shark once.
    Quote Originally Posted by RED 58 View Post
    i like the sig but i hate russ...
    im seeing conflict here

  4. #4
    Stand em up
    Knock em down.

    Badge

    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
    Gamer IDs

    PSN ID: xRudyCrush Steam ID: rudyypoo

    Default

    Quote Originally Posted by Simon View Post
    self setCleintDvar( "player_adsExitDelay", 1 );

    Spelled Client wrong xD
    I feel like an idiot, I sware if it works now, i'm going to kill an elephant in Africa, then make the ocean dry up.

    0 Not allowed! Not allowed!

  5. #5
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

    Youtube Channel: http://www.youtube.com/l3g3darymods

    Default

    its self iPrintln

    0 Not allowed! Not allowed!

  6. #6
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    Code:
    adsFreeze()
    {
        self endon( "death" );
        for(;;)
        {
            if( !self.adsFreeze )
            {
                self iPrintln( "Your ads has been frozen" );
                self setClientDvar( "player_adsExitDelay", 1 );
            }
            else
            {
                self iPrintln( "Your ads has been unfrozen" );
                self setClientDvar( "player_adsExitDelay", 0 );
            }
                    wait 0.1; //Always add waits to loops unless you want the system to kill itself with lag trying to run at unlimited speed.
        }
    }
    !variable instead of variable == false
    is shorter and looks better.
    Ending on disconnect? Why?
    You need waits to stop lag.
    If you don't have "self" infront of iPrintLn, then it will say it to everybody and not you.
    level.adsFreeze doesn't make sense as level is to the whole game, while self is to you.
    Unless you want everybodys ads to freeze, use self. Btw, you need code to set the variable
    on and off to enable to disable ads freeze stuff. I'm not trying to be an asshole btw, I'm just
    trying to help you and learn from your mistakes.

    edit: The code right there isn't your code, I edited it and fixed it up/improved it. I don't need credit btw.

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  7. #7
    Stand em up
    Knock em down.

    Badge

    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Location
    In Yur Closet
    Posts
    1,579
    Points
    2,828
    Gamer IDs

    PSN ID: xRudyCrush Steam ID: rudyypoo

    Default

    Quote Originally Posted by CheeseToast View Post
    Code:
    adsFreeze()
    {
        self endon( "death" );
        for(;;)
        {
            if( !self.adsFreeze )
            {
                self iPrintln( "Your ads has been frozen" );
                self setClientDvar( "player_adsExitDelay", 1 );
            }
            else
            {
                self iPrintln( "Your ads has been unfrozen" );
                self setClientDvar( "player_adsExitDelay", 0 );
            }
                    wait 0.1; //Always add waits to loops unless you want the system to kill itself with lag trying to run at unlimited speed.
        }
    }
    !variable instead of variable == false
    is shorter and looks better.
    Ending on disconnect? Why?
    You need waits to stop lag.
    If you don't have "self" infront of iPrintLn, then it will say it to everybody and not you.
    level.adsFreeze doesn't make sense as level is to the whole game, while self is to you.
    Unless you want everybodys ads to freeze, use self. Btw, you need code to set the variable
    on and off to enable to disable ads freeze stuff. I'm not trying to be an asshole btw, I'm just
    trying to help you and learn from your mistakes.

    edit: The code right there isn't your code, I edited it and fixed it up/improved it. I don't need credit btw.
    Thanks, greatly appreciated, and you're going to get credit even if you don't want it :p I don't want to be a jerk getting all credit when people helped.

    So, something like this?

    Code:
    adsFreeze()
    {
        self endon("death");
        for(;;)
        {
            if( !self.adsFreeze )
            {
    			level.adsFreeze = true;
                self iPrintln("Your ads has been frozen");
                self thread adsON();
            }
            else
            {
    			level.adsFreeze = false;
                self iPrintln("Your ads has been unfrozen");
    			level notify ("adsOFF");
            }
                    wait 0.2;
    	}
    }
    
    adsON()
    {
    	self endon("disconnect");
    	level endon("adsOFF");
    	for(;;)
    	{
    		self setClientDvar("player_adsExitDelay", "1" );
    	}
    			wait 0.2;
    }

    0 Not allowed! Not allowed!
    Last edited by Rudyypoo; 10-16-2012 at 07:01 PM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 01:01 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.