/reconnect
#1

It make everyone to reconnect.
I want it like...
THE player who type the command, reconnect.

I gonna use this for a register dialog system
When he register, the game restart for him.

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(GetPVarInt(playerid, "Reconnect") == 1)
    {
        new string[25], playerIP[16];
        GetPlayerIp(playerid, playerIP, sizeof(playerIP));
        format(string, sizeof(string), "unbanip %s",playerIP);
        SendRconCommand(string);
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(reconnect, 9, cmdtext);
    return 0;
}

dcmd_reconnect(playerid, params[])
{
    #pragma unused params
    SetPVarInt(playerid, "Reconnect", 1);
    new string[23], playerIP[16];
    GetPlayerIp(playerid, playerIP, sizeof(playerIP));
    format(string, sizeof(string), "banip %s",playerIP);
    SendRconCommand(string);
    return 1;
}
Reply


Messages In This Thread
/reconnect - by Unknown123 - 05.02.2011, 00:59
Re: /reconnect - by Lorenc_ - 05.02.2011, 01:01
Re: /reconnect - by Kitten - 05.02.2011, 01:02
Re: /reconnect - by Unknown123 - 05.02.2011, 01:04
Re: /reconnect - by Lorenc_ - 05.02.2011, 01:24
Re: /reconnect - by Unknown123 - 05.02.2011, 01:39
Re: /reconnect - by Kitten - 05.02.2011, 01:53
Re: /reconnect - by [L3th4l] - 05.02.2011, 03:53

Forum Jump:


Users browsing this thread: 3 Guest(s)