BlockIpAddress problem
#1

Well,I was trying to make reconnect cmd.I have seen a tutorial here in the forumsa about this using banip rcon cmd.But I was thinking of making it using BlockIpAddress function,but it doesnt seem to work.It seems that the function doesnt block the IP FOR the amount of time I have set,but AFTER it.Also I noticed that it doesnt do anything if I set the time to less than 9848 ms.My idea is the IP to get unblocked while the player tries to re-establish the connection,but it directly gives the "You are banned from this server." text.So,is it even possible to use BlockIpAddress for reconnecting or I should use the old method using banip rcon cmd.Here is my script:
pawn Код:
CMD:rc(playerid,params[]){
    new player2,IP[16];
    if(PInfo[playerid][Lvl]>=4){
        if(sscanf(params,"u",player2)) player2=playerid;
        format(Msg,256,"%s is reconnecting.",PInfo[player2][PName]);
        SendClientMessageToAll(-1,Msg);
        GetPlayerIp(player2,IP,16);
        BlockIpAddress(IP,9848);
        format(Msg,256,"Blocking %s",IP);
        SendClientMessageToAll(-1,Msg);}
    else return 0;
    return 1;}
Reply
#2

Everything seems good , once check your enums..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)