SA-MP Forums Archive
/unbanip crashes server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /unbanip crashes server (/showthread.php?tid=265041)



/unbanip crashes server - freshOrange - 29.06.2011

pawn Код:
if(strcmp(cmd,"/unbanip",true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 3)
        {
            tmp = strtok(cmdtext,idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid,COLOR_GRAD1,"Example: /unbanip [players ip]");
                return 1;
            }
            format(string,sizeof(string),"unbanip %s",tmp);
            RemoveBan(tmp);
            SendRconCommand(string);
            SendRconCommand("reloadbans");
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] == 11) { sendername = "Hidden Administrator"; }
            format(string, 256, "* %s has unbanned IP %s", sendername,tmp);
            ABroadCast(COLOR_YELLOW,string,1);
        }
        return 1;
    }
Why does it crashes the server?


Re: /unbanip crashes server - bartje01 - 29.06.2011

Server logs?