Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    66
    Points
    111
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    66
    Points
    111

    Default [HELP]Can Someone help me fix this script?

    I want to port the timer from Pwnzer's mod to Trents, but in doing so, i got an "uninitialised function 'player'" error... can someone help fix it? Please and thank you! :h:

    By the way, the maps\custom\_mod_menu::killall(); and maps\custom\_mod_menu::mapRestart(); exists so that's not the problem...

    Code:
    doNuke()
    {
    	player thread NukeTimer( 10 );	
    	
    	for( i = 0; i < players.size; i++ )
    	{
    		self waittill( "finished_timer" );
    		players thread NukeEffect();
    		wait 3.5;
    		self thread maps\custom\_mod_menu::killall();
    		wait 1.5;
    		self thread maps\custom\_mod_menu::mapRestart();
    	}
    }
    
    NukeEffect()
    {
    	self.white = newClientHudElem( self );
    	self.white createElement( ( 1, 1, 1 ), true, "fullscreen", "fullscreen", 0, 0, 0, 0 );
    	self.white setShader( "white", 800, 800 );
    	self.white.alpha = 0;
    	self.white fadeOverTime( 4.0 );
    	self.white.alpha = 1;
    }
    
    NukeTimer( time )
    {
            Timer = NewHudElem();
            Timer.elemType = "timer";
            Timer.alignX = "right";
            Timer.alignY = "top";
            Timer.horzAlign = "right";
            Timer.vertAlign = "top";
            Timer.y = 20;
            Timer.x = -27;
            Timer.foreground = true;
            Timer.hideWhenInMenu = true;
            Timer.fontScale = 1.3;
            Timer.font = "default";
            Timer.alpha = 1;
            Timer.color = ( 170, 170, 170 );
            Timer.glowColor = ( 1, 0, 0 );
            Timer.glowAlpha = 25;
            Timer SetTimer( time );
            Icon = NewHudElem();
            Icon.elemType = "icon";
            Icon.alignX = "right";
            Icon.alignY = "top";
            Icon.horzAlign = "right";
            Icon.vertAlign = "top";
            Icon.foreground = false;
            Icon.hideWhenInMenu = true;
            Icon.x = -10;
            Icon SetShader( "rank_prestige15" ,60, 60 );
            clockObject = spawn( "script_origin", ( 0, 0, 0 ) );
            clockObject hide();
            for( i = 0; i < time + 1; i++ )
            {
                    clockObject playSound( "mpl_sab_ui_suitcasebomb_timer" );
                    wait 1;
            }
            Timer destroy();
            Icon  destroy();
            self notify( "finished_timer" );
    }

    0 Not allowed! Not allowed!

  2. #2
    Member
    Join Date
    Jul 2011
    Posts
    194
    Points
    336
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Posts
    194
    Points
    336

    Default

    i am too of a newb to do that sorry.

    0 Not allowed! Not allowed!

  3. #3
    UnDeAd KiNg
    ZoMbIETrAiNer

    Join Date
    Apr 2011
    Posts
    200
    Points
    333
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    200
    Points
    333

    Default

    get rid of this

    for( i = 0; i < players.size; i++ )

    0 Not allowed! Not allowed!

  4. #4
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Or you could just do players[I]

    Btw player thread nukeTimer( 10 );
    Player is not defined

    0 Not allowed! Not allowed!

  5. #5
    Member
    Join Date
    Aug 2011
    Posts
    66
    Points
    111
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    66
    Points
    111

    Default

    What do you mean player is not defined? and player[I] replaces for( i = 0; i < players.size; i++ ) ?

    0 Not allowed! Not allowed!

  6. #6
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Wow you're terrible...
    Player thread NukeTimer( 10 );
    Player is not defined

    You can only do self and level thread, unless you define another entity

    YOU DID NOT DEFINE PLAYER
    simple as that, if you honestly don't know what that means then GTFO

    0 Not allowed! Not allowed!

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 11:59 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.