IP banned after relog
#1

Hello,
I made a cmd /relog with ZCMD but when someone do /relog that player's ip got banned
My script:
pawn Код:
CMD:relog(playerid, params[]) {
    new
        i = 0,
        cmd[32] = "banip "
    ;
    while(++i != 10) {
        SendClientMessage(playerid, -1, " ");
    }
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "Reconnecting...");
    GetPlayerIp(playerid, cmd[6], (sizeof cmd - 6));
    SetPVarString(playerid, "reconnect", cmd[6]);
    SendRconCommand(cmd);
    return true;
}
Reply
#2

You need to unbanip on OnPlayerDisconnect
Reply
#3

How Can you please script it
Reply
#4

Please Help Me
Reply
#5

pawn Код:
new IP[MAX_PLAYERS][16], reconnect[MAX_PLAYERS];

CMD:reconnect(playerid, params[])
{
    reconnect[playerid] = 1;
    GetPlayerIp(playerid, IP[playerid], 16);
    new cmd[30];
    format(cmd, sizeof cmd, "banip %s", IP[playerid]);
    SendRconCommand(cmd);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    if(reconnect[playerid] == 1)
    {
        new cmd[30];
        format(cmd, sizeof cmd, "unbanip %s", IP[playerid]);
        SendRconCommand(cmd);
        reconnect[playerid] = 0;
    }
    return 1;
}
Not tested
Reply
#6

Thnx i'll test it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)