/disconnect and /reconnect?
#1

Hi its me jake again.

I was just wondering if it was possible to make a command such as...

/reconnect = will disconnect and then go back to where you first join and it says connecting to.
/disconnect = will disconnect and just show... Server closed the connection.
Reply
#2

/disconnect is possible but I don't think /reconnect is
Reply
#3

At Disconnect you could Kick the player, and at Reconnect the maximum you can do is kill the player and force selection class. :/
Reply
#4

/disconnect =
Код:
kick(playerid);
reconnect isnt possible if your not connected to the server.
Reply
#5

I know the /kick

but i am asking if you do /disconnect it will show
You have been disconnected from the server.
Server closed the connection.
Then if player is still in game after 10 seconds it will close the game.

Is that possible?
Reply
#6

Basic /disconnect command:

pawn Код:
//under OnPlayerCommandText

if(strcmp(cmdtext, "/disconnect", true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFFF, "You have been disconnected from the server.");
    Kick(playerid);
    return 1;
}
But shutting players game through script isn't possible.
Reply
#7

Quote:
Originally Posted by Jake Canfield
I know the /kick

but i am asking if you do /disconnect it will show
You have been disconnected from the server.
Server closed the connection.
Then if player is still in game after 10 seconds it will close the game.

Is that possible?
That isn't possible if you kick the player (meaning you actually disconnect them). If you disconnect them, how is the server gonna be able to communicate with the player? Once you disconnect, the link between server and player is cut off, you cant magically re-connect them back. Otherwise so many servers would make people automatically connect to their servers (lol, that' d be hilarious) without even the player wanting to play there. What you can probably do is fake disconnect the player (like send the player a message like "Server closed the connection.", then when they type /reconnect do something?

EDIT:
Quote:
Originally Posted by MadeMan
But shutting players game through script isn't possible.
Well, you can kinda do that, by making the player crash. look at some /f****up command i think these do the job. Not sure though.
Reply
#8

Quote:
Originally Posted by MadeMan
Basic /disconnect command:

pawn Код:
//under OnPlayerCommandText

if(strcmp(cmdtext, "/disconnect", true) == 0)
{
    SendClientMessage(playerid, 0xFFFFFFFF, "You have been disconnected from the server.");
    Kick(playerid);
    return 1;
}
But shutting players game through script isn't possible.
Can you make that in a filterscript for me?
Reply
#9

Quote:
Originally Posted by Jake Canfield
Can you make that in a filterscript for me?
Just put it into your script under OnPlayerCommandText.
Reply
#10

The only way of closing player's game is to crash the client.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)