Question.
#2

pawn Код:
dcmd_b(playerid, params[])
{
     if(PlayerInfo[playerid][AdminLevel] > 2)
    {
        new toplayerid, reason[ 128 ];
        new File:LAdminfile,filepath[256];  
        if (sscanf(params, "us[128]", toplayerid, reason))
        {
            SendClientMessage(playerid, 0xAA3333AA, "Syntax Error: /b < Playerid > < Reason >");
            return 1;
        }
        if (toplayerid == INVALID_PLAYER_ID)
        {
            SendClientMessage(playerid, 0xAA3333AA, "Input Error: Player is not connected or it is yourself.");
            return 1;
        }
        new banString[128], adminName[24], bannedName[24];
        GetPlayerName(playerid, adminName, 24);
        GetPlayerName(toplayerid, bannedName, 24);
        format(banString, 128, "Player %s was banned by Administrator %s. Reason: %s.", bannedName, adminName, reason);
        SendClientMessageToAll(0xAA3333AA, banString);
        LAdminfile = fopen(filepath,io_append);
        fwrite(LAdminfile,banString);
        new str[100];
        format(str,sizeof str,"0,4Player %s was banned by Administrator %s. Reason: %s", bannedName, adminName, reason);
        IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
        BanLog(banString);
        Ban(toplayerid);
        fclose(LAdminfile);
    }
    return 1;
Reply


Messages In This Thread
Question. - by Face9000 - 20.12.2010, 17:04
Re: Question. - by blackwave - 20.12.2010, 17:12
Re: Question. - by Face9000 - 20.12.2010, 17:13
Re: Question. - by blackwave - 20.12.2010, 17:15
Re: Question. - by Face9000 - 20.12.2010, 17:18
Re: Question. - by Seven. - 20.12.2010, 17:19
Re: Question. - by Face9000 - 20.12.2010, 17:20
Re: Question. - by Face9000 - 20.12.2010, 17:38

Forum Jump:


Users browsing this thread: 3 Guest(s)