[HELP] Unban CMD
#3

try this
pawn Код:
CMD:unban(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128];
        if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unban [playername]");

        if( PlayerInfo[playerid][pBan] >= 1 )
        {
            PlayerInfo[playerid][pBan] = 0;
            print("OnPlayerOfflineLogin: Variables saved properly");
            format(string, 128, "[ADMIN] %s (IP:%s) was unbanned by %s.", params, PlayerInfo[playerid][pIP], GetPlayerNameEx(playerid));
            SendStaffMessage(COLOR_RED,string);
            new year, month,day;
            getdate(year, month, day);
            new playa[MAX_PLAYER_NAME];
            GetPlayerName(playerid, playa, MAX_PLAYER_NAME);
            format(string, sizeof(string), "[ADMIN] %s : was unbanned by %s.", params, playa);
            SendStaffMessage(COLOR_RED, string);
        }
        else
        {
            SendClientMessage( playerid, COLOR_WHITE, "Not a banned account or no such account was found!" );
        }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Unban CMD - by cleanboy - 27.06.2014, 13:01
Re: [HELP] Unban CMD - by cleanboy - 27.06.2014, 13:09
Re: [HELP] Unban CMD - by ScripteRNaBEEL - 27.06.2014, 13:20
Re: [HELP] Unban CMD - by cleanboy - 27.06.2014, 13:44
Re: [HELP] Unban CMD - by ScripteRNaBEEL - 27.06.2014, 13:49
Re: [HELP] Unban CMD - by ScripteRNaBEEL - 27.06.2014, 13:54
Re: [HELP] Unban CMD - by DaniceMcHarley - 27.06.2014, 14:10
Re: [HELP] Unban CMD - by BroZeus - 27.06.2014, 14:47
Respuesta: [HELP] Unban CMD - by Shura - 27.06.2014, 15:22
Re: [HELP] Unban CMD - by miguelangel988 - 27.06.2014, 16:27

Forum Jump:


Users browsing this thread: 1 Guest(s)