[Ajuda] ajuda
#10

pawn Код:
stock UnBanNick(Nome[])
{
    new mStr[128];
    format(mStr, 128, LOCALBANNICK, Nome);
    if(!DOF2_FileExists(mStr))return 0;
    DOF2_RemoveFile(mStr);
    format(mStr, 128, "Aviso- O nick %s acaba de ser desbanido.",Nome);
    return SendClientMessageToAll(-1, mStr), 1;
}
stock UnBanIP(mIP[])
{
    new mStr[128];
    format(mStr, 128, LOCALBANIP, mIP);
    if(!DOF2_FileExists(mStr))return 0;
    DOF2_RemoveFile(mStr);
    format(mStr, 128, "-Aviso- O ip %i acaba de ser desbanido.", mIP);
    return SendClientMessageToAll(-1, mStr), 1;
}

CMD:desban(mPlayer, mParams[])
{
    if(isnull(mParams))
    {
        return SendClientMessage(mPlayer, -1, "/desban (ip/nick)");
    }

    new mNum, i;
    for(; i != strlen(mParams); ++i)
    {
        if(mParams[i] == '.' || (mParams[i] >= '0' && mParams[i] <= '9'))
        {
            ++mNum;
        }
    }
    if(mNum >= 5)
    {
        if(!UnBanIP(mParams)) return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");
    }
    else
    {
        if(!UnBanNick(mParams)) return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");
    }
    return 1;
}
Agora funciona.

@Garfield

Nгo
Reply


Messages In This Thread
ajuda - by lucaskill66 - 09.10.2012, 23:40
Re: ajuda - by ViniBorn - 09.10.2012, 23:53
Re: ajuda - by arakuta - 10.10.2012, 00:05
Re: ajuda - by Metropole RP - 10.10.2012, 00:40
Re: ajuda - by lucaskill66 - 10.10.2012, 01:12
Re: ajuda - by Metropole RP - 10.10.2012, 01:41
Re: ajuda - by zSuYaNw - 10.10.2012, 01:56
Re: ajuda - by Jason` - 10.10.2012, 02:02
Re: ajuda - by lucaskill66 - 10.10.2012, 02:50
Re: ajuda - by Metropole RP - 10.10.2012, 19:17

Forum Jump:


Users browsing this thread: 1 Guest(s)