Blockland Forums > Modification Help
GameConnection::onConnectRequest
(1/2) > >>
Irk89:
So i'm having a little issue with this function for obvious reasons.  The authentication proccess is found in this function.  What I'm trying to do is create a "reserved list" for people on it to be able to join even when the server is full.  The only way to do this is by adding on to this function.  for example:


--- Code: ---package reserve
{
   function GameConnection::onConnectRequest(%this)
   {
       Parent::onConectRequest(%this);
   }
};
activatePackage(reserve);

--- End code ---

So obviously I would put more in the function than just executing the parent, but it dosen't matter.  Once saved and executed and you try to enter the server, you get an authentication failed message on joining the server.

Is there any work around this or is there another function that I can use that dosen't include the authentication process.
Trader:
I'm not in a place where I can test this now, but I have a suggestion for how to do the reserved list.

If bl id is on reserved list, increase max players by one.  Then, if a player leaves and the max players is higher that it was originally, decrease it by one.
Zor:
okay well first of all you have a typo

--- Quote ---Parent::onConnectRequest(%this);
--- End quote ---
Irk89:
Thank you, I was just typing fast and that's how it came out.  Still dosen't work with the correct spelling.

@Trader- That was my origonal idea.  I think i'm going to have multiple ways of doing it and letting the user have the option to which method they want.

1. increase maxplayers when a reserve wants in (then decrease when someone leaves

2. randomly kick a nonadmin and nonreserve player in the server to allow them in.

3. Just let them in and be over the max (ie...13/12)

Suggestions are nice, but I still need help on finding a work around.
Zor:
well there may be more variables passed to the connect request, so maybe try this


--- Code: ---package reserve
{
   function GameConnection::onConnectRequest(%this,%a,%b,%c,%d)
   {
       echo(%this TAB %a TAB %b TAB %c TAB %d);
       Parent::onConectRequest(%this,%a,%b,%c,%d);
   }
};
activatePackage(reserve);

--- End code ---
Navigation
Message Index
Next page

Go to full version