Post: Stop Session Joining (Easy Way)
10-13-2010, 01:07 AM #1
AlabamaHit
ROLL TIDE!!!
(adsbygoogle = window.adsbygoogle || []).push({}); delete and close
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to AlabamaHit for this useful post:

BuC-ShoTz, GNDOOOR_KILLER, mattbettiol, Swifter, xTrYiPiCz
10-14-2010, 04:27 AM #20
AlabamaHit
ROLL TIDE!!!
Originally posted by BucN View Post
i just like how it handled me when i joined


So you have it in your patch?

Can you clear the air up and verify that as soon as it loads the map your kicked...you can't join at all, no spectaing or nothing...

I think some people think it don't work.
10-14-2010, 10:25 PM #21
Originally posted by AlabamaHit View Post
This will stop people from joining your game.

It will kick them as soon as they connect.
They can not even try to mess with you by going to spectator.
It kicks them before they even make it that far.

This is all in the _mission.gsc (atleast where I did it).

In the "onPlayerConnect()" Function.

Yours will have stuff there already. you will see

    
for(;Winky Winky
{
//all your code
//will be right here...
//all your if statements or whatever.
//This is the code you will move to where I say later.
}



Now..Find:

    
level waittill( "connected", player );


Add this Right after that level waittill

    
if(level.autoJoin == false)
{
//All your code that I showed you where was at before will
//Go right here.
level.autoJoin = false; //You have to ADD this
}
else
{
kick( player getEntityNumber() );
}



Now the function. To toggle it. This can be added anywhere in your mission.gsc

    
doAutoJoin()
{
if(self isHost())
{
if(level.autoJoin == false)
{
level.autoJoin = true;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^3People can ^1NOT ^3Join" );
}
else
{
level.autoJoin = false;
self thread maps\mp\gametypes\_hud_message::hintMessage( "^3Pepole ^2CAN ^3Join" );
}
}
}


Now just have to add it to your menu. So in your Admin section or whatever you call yours. You need to add 2 things.

The name which mine was this...
    
menu.name[3] = "Toggle Session Join";


Now you ad the function.

    
menu.function[3] = ::doAutoJoin;


There is no Input for this. It isn't needed.

If you any questions just ask.

DO NOT say I can't do it. Do it for me.

If you need help post a snippet of the code your having trouble with I will help or someone else will.

No one can debug stuff without seeing code.


Haha, I was the tester for this. It works. Nice KG.
10-15-2010, 03:13 AM #22
regilex
Do a barrel roll!
Lets say I wanted to toggle this by pressing a button. Is this right?

    doAutoJoin2()
{
if(self isHost())
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "down", "+actionslot 2");
for(;Winky Winky
{
if ( self GetStance() == "prone" ) {
if(level.autoJoin == false)
{
self waittill("down");
level.autoJoin = false
self thread maps\mp\gametypes\_hud_message::notifyMessage( "Match is joinable." );
self waittill("down");
level.autoJoin = true
self thread maps\mp\gametypes\_hud_message::notifyMessage( "Match is NOT joinable." );
}
}
}
}
}
10-15-2010, 04:46 AM #23
Originally posted by EliteMossy View Post
This way is OK, but people still connect and then the game has to kick which can cause lag. My method stops them before they get the chance to see the lobby.


I tested it Mossy. It doesen't lag at all. When I was hosting on your patch, it lagged the game out. Sorry.

The following user thanked TJ84910 for this useful post:

AlabamaHit
10-15-2010, 07:34 PM #24
AlabamaHit
ROLL TIDE!!!
Originally posted by TJ84910 View Post
I tested it Mossy. It doesen't lag at all. When I was hosting on your patch, it lagged the game out. Sorry.


He also complained about it waiting for them to connect. I just looked at his patch, and his session stopper is the exact same way, waiting for them to connect.

---------- Post added at 03:34 PM ---------- Previous post was at 03:33 PM ----------

Originally posted by regilex View Post
Lets say I wanted to toggle this by pressing a button. Is this right?

    doAutoJoin2()
{
if(self isHost())
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "down", "+actionslot 2");
for(;Winky Winky
{
if ( self GetStance() == "prone" ) {
if(level.autoJoin == false)
{
self waittill("down");
level.autoJoin = false
self thread maps\mp\gametypes\_hud_message::notifyMessage( "Match is joinable." );
self waittill("down");
level.autoJoin = true
self thread maps\mp\gametypes\_hud_message::notifyMessage( "Match is NOT joinable." );
}
}
}
}
}


THat does look ok. should work.
10-15-2010, 08:02 PM #25
Originally posted by AlabamaHit View Post
He also complained about it waiting for them to connect. I just looked at his patch, and his session stopper is the exact same way, waiting for them to connect.

---------- Post added at 03:34 PM ---------- Previous post was at 03:33 PM ----------



THat does look ok. should work.


I think that he's digging himself into a deep deep hole.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo