I need this... >>> Read More & Respond Fast
#1

Hi Looks like the login bug is gone i fix it myself
now i need some favor. for you guys.
i have seen this on stunt planet forums.
and i want to make that system too when you get ban
and you connect again it will send a message that you cant
connect/join and ban by :Admins Name Just Like This



Note: I copy this picture but this is not mine
Copyright to the owner.

here is Ban Command if needed:

pawn Код:
CMD:ban(playerid, params[])
{
    new pid;
    new ip[128];
    if(PlayerInfo[playerid][pAdmin] >= 3 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /ban <playerid/name> <reason>");
        if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected!");
        if(pid == playerid) return SendClientMessage(playerid,COLOR_RED, "ERROR: You cant ban yourself!");
        new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
        new year,month,day; getdate(year, month, day);
        new hour,minute,second; gettime(hour,minute,second);
        GetPlayerName(pid, paramname, sizeof(paramname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        if(PlayerInfo[pid][pAdmin] >= PlayerInfo[playerid][pAdmin])
        {
           SendClientMessage(playerid, COLOR_RED, "ERROR: You cant ban higher rank Administrators!");
        }
        format(string, sizeof(string), "Administrator %s has ban %s <Reason: %s> <Date: %d/%d/%d> <Time: %d:%d>",adminname,paramname, params[2],month,day,year,hour,minute);
        SendClientMessageToAll(COLOR_RED, string);
        format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(pid,COLOR_RED, string);
        format(string, sizeof(string), ""red"Administrator Bans You: %s\nTime: %d:%d\nDate: %d/%d/%d\nReason: %n\nNote:"white"If you are mistakely get banned go to our forums at [url]www.server.com\nand[/url] make unban appeal", adminname, params[2],hour,minute,month,day,year,params[2]);
        ShowPlayerDialog(pid,453, DIALOG_STYLE_MSGBOX,""white"Banned Info:",string,"Ok","");
        SendClientMessage(pid,COLOR_WHITE, "==============================================");
        format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(pid,COLOR_RED, string);
        SendClientMessage(pid,COLOR_RED, "Make unban appeal at our forums. www.server.com");
        SendClientMessage(pid,COLOR_WHITE, "==============================================");
        format(string, sizeof(string), "You ban %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(playerid,COLOR_RED, string);
        SaveIn("BanLog",string);
        Ban(pid);
        format(ip,128,"%s**",ip);
        format(ip,128,"banip %s",params[2]);
        SendRconCommand(ip);
        new INI:File = INI_Open(UserPath(playerid));
        INI_WriteInt(File,"Banned",1);
        INI_Close(File);
        format(string,sizeof(string),"Administrator %s has banned %s",adminname,paramname);
        SendToAdmins(COLOR_GREY,string);
        format(string, sizeof(string), "Administrator %s has banned %s <Reason:%s>",adminname,paramname,params[2]);
        printf(string);
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 3 to use this command");
    return 1;
}
Please guys i need help

Note:Next time dont give me strcmp format just give me ZCMD and sscanf command for this topic
And Please Respond Fast
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)