Reconnect??
#1

Is it possible to make the player reconnect.

I saw in Minigames Server that you are able to reconnect yourself by requesting in Admin..

But the reconnect tutorial in the Scripting Tutorial is not working.
That's why i ask here if it's possible.

Cause i really see it with my two eyes that the admin reconnect me..
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=348044

they said use this

but all he did iz ban the player and them on ban :/ when i read the code, hope u see something cause ive been trying to make logout command
Reply
#3

there are many tut around you can learn from it i don't like copy pasting so search in ****** will be better!
Reply
#4

tired with "Search" thing, I already try that.
Anyone else?
Reply
#5

I tried that "Search" thing too and found this: http://forum.sa-mp.com/showthread.ph...ight=reconnect.
Reply
#6

you didnt say what command processors so im going to use ZCMD & sscanf
pawn Код:
//make this variable
new PlayerReconnecting[MAX_PLAYERS];

//the command
COMMAND:reconnect(playerid, params[])
{
    new targetid;if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE" Usage: "GREEN"/Reconnect "WHITE"[playerid]");
        new string[16 + 6],destid = targetid,ipstring[16];
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, ""RED"» Error: "WHITE"Player Is Not Connected!");
        GetPlayerIp(destid, ipstring, 16), SetPVarString(destid, "pIp", ipstring);
        format(string, sizeof(string), "banip %s",ipstring);
        SendRconCommand(string);
        PlayerReconnecting[destid]=1;
        return SendClientMessage(destid, COLOR_WHITE, "Reconnecting...");
}

//then later on
public OnPlayerDisconnect(playerid, reason)
{
    if(PlayerReconnecting[playerid]==1)
    {
        new string[8+16];
        GetPVarString(playerid, "pIp", string, 16);
        format(string, sizeof(string), "unbanip %s", string);
        SendRconCommand(string);
    }
}
Reply
#7

ur code didnt help needs re-editing
Reply
#8

It was fixed in 0.3e R2
Reply
#9

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=348044

they said use this

but all he did iz ban the player and them on ban :/ when i read the code, hope u see something cause ive been trying to make logout command
Banning the player's IP and unbanning it under OnPlayerDisconnect will cause them to reconnect.
Reply
#10

actuall it banned the player, it tested it, it said ur banned from the server. everything works, u get reconnect but when ur rejoining its said ur ban from the server
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)