26.02.2017, 07:14
I asked a good friend of mine to make me an good ipban command which he gave me this
the issue i have is, it kicks the player and if the player try's to rejoin or change there name it kicks them, but the issue is if i restart the whole server theip isn't banned again, so each time i do /rcon gmx, the ip wont be banned , can someone help me please
Код:
CMD:permban(playerid, params[]) { if(IsPlayerAdmin(playerid) || pInfo[playerid][Admin] >= 4) { new targetid, reason[64]; if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessage(playerid, error, "Usage: /permban [playerid] [reason]"); new str[128]; format(str, sizeof(str), "AdmCmd: An Administrator has permanently banned %s. [Reason: %s.]", GetName(targetid), reason); SendClientMessageToAll(red, str); GameTextForPlayer(targetid, "~r~Banned", 5000, 5); format(astring, sizeof(astring), "AdmCmd: You have been permanently banned from the server. You were banned by Administrator %s.", GetName(playerid)); SendClientMessage(targetid, red, astring); SendClientMessage(targetid, red, "AdmCmd: If you think this ban is unfair post an appeal on our forums and take a screen shot of this message."); BlockIpAddress(ReturnPlayerIp(targetid), 0); SetTimerEx("BanPlayer",200,false,"ud", targetid,2); CommandToAdmins(playerid,"permban"); } else return ShowMessage(playerid, error, 1); return 1; }