Results 1 to 8 of 8

Thread: welcome script

  1. #1
    ... connecting
    Join Date
    May 2018
    Posts
    4
    Thanks
    1
    Thanked 2 Times in 2 Posts

    welcome script

    ...........
    Last edited by warrior; 23rd May 2018 at 13:07.

  2. The Following User Says Thank You to warrior For This Useful Post:

    kubislav23 (23rd May 2018)

  3. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Code:
    Callback_PlayerConnect()
    {
    ....
    	self setClientCvar("g_scriptMainMenu", scriptMainMenu);
    	
    	self.message_done = undefined;
    	
    	self thread welcomeMessage();
    }
    
    welcomeMessage()
    {
    	if( isDefined( self.message_done ) )
    		return;
    	self.message_done = true;
    	
    	self endon( "disconnect" );
    	self endon( "death" );
    
    	self waittill("spawned_player");
    
    	self iprintlnbold("^4D^7obrodosli na  ^4W^7a^4RR^7io^4R^7s BigJump ^7SERVER " + self.name + " ^4!"); 
            wait 3;
    	self iprintlnbold("^4L^7ijepo ^4s^7e ^4z^7abavite");
            wait 3;
    	self iprintlnbold("^4P^7osjetite ^4n^7as ^4o^7pet ^4:)");
    
    }
    That will show the messages once, and once only.

  4. The Following User Says Thank You to Tally For This Useful Post:

    warrior (23rd May 2018)

  5. #3
    ... connecting
    Join Date
    May 2018
    Posts
    4
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Thank you very much, Tally!
    this was so helpful!

  6. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    @Tally: The OP is talking about SD gametype, so it might be wise to store the check in a .pers array var.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. #5
    ... connecting
    Join Date
    May 2018
    Posts
    4
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Hey, this work only if you go to spectate and join back, but at the half of the time, when you switch teams, it appears again :/

  8. #6
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by IzNoGoD View Post
    @Tally: The OP is talking about SD gametype, so it might be wise to store the check in a .pers array var.
    Thanks for the heads-up. I didn't see the bit about SD gametype.

    So, this instead:

    Code:
    Callback_PlayerConnect()
    {
    ....
    	self setClientCvar("g_scriptMainMenu", scriptMainMenu);
    	
    	self.pers["message_done"] = undefined;
    	
    	self thread welcomeMessage();
    }
    
    welcomeMessage()
    {
    	if( isDefined( self.pers["message_done"] ) )
    		return;
    	self.pers["message_done"] = true;
    	
    	self endon( "disconnect" );
    	self endon( "death" );
    
    	self waittill("spawned_player");
    
    	self iprintlnbold("^4D^7obrodosli na  ^4W^7a^4RR^7io^4R^7s BigJump ^7SERVER " + self.name + " ^4!"); 
            wait 3;
    	self iprintlnbold("^4L^7ijepo ^4s^7e ^4z^7abavite");
            wait 3;
    	self iprintlnbold("^4P^7osjetite ^4n^7as ^4o^7pet ^4:)");
    
    }

  9. #7
    ... connecting
    Join Date
    May 2018
    Posts
    4
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Bf, it doesn't work... it appears after Half-Time... I've tried everything possible. Goddamn it

  10. The Following User Says Thank You to warrior For This Useful Post:

    kubislav23 (23rd May 2018)

  11. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by Tally View Post
    Thanks for the heads-up. I didn't see the bit about SD gametype.

    So, this instead:

    Code:
    Callback_PlayerConnect()
    {
    ....
    	self setClientCvar("g_scriptMainMenu", scriptMainMenu);
    	
    	self.pers["message_done"] = undefined;
    	
    	self thread welcomeMessage();
    }
    
    welcomeMessage()
    {
    	if( isDefined( self.pers["message_done"] ) )
    		return;
    	self.pers["message_done"] = true;
    	
    	self endon( "disconnect" );
    	self endon( "death" );
    
    	self waittill("spawned_player");
    
    	self iprintlnbold("^4D^7obrodosli na  ^4W^7a^4RR^7io^4R^7s BigJump ^7SERVER " + self.name + " ^4!"); 
            wait 3;
    	self iprintlnbold("^4L^7ijepo ^4s^7e ^4z^7abavite");
            wait 3;
    	self iprintlnbold("^4P^7osjetite ^4n^7as ^4o^7pet ^4:)");
    
    }
    Even with that, onconnect is called during the fast_restart used to go to next round/halftime. Might wanna remove the = undefined thing in there. It's undefined by default, when a client connects. Set it on first spawn, then never touch it again.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •