[Ajuda] Sistema de divulgaзao
#2

public OnPlayerCommandText (caso haja algum comando, por exemplo o /an, etc. Onde todos podem ver, inclua isto nos mesmos)
pawn Код:
if(TentouDivulgar(result))
            {
                if(cdivulgar[playerid] >= 4)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й um lixo, nгo divulgue aqui!");
                    SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                    Kick(playerid);
                }
                format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,PlayerName(playerid),result);
                ABroadCast(COLOR_YELLOW,string,1);
                DivulgouLog(string);
                cdivulgar[playerid] += 1;
                return 1;
            }
OnPlayerCommandText (tbm, se nao me engano)
pawn Код:
stock TentouDivulgar(string[])
{
    new x=0;
    for (new i = 0, j = strlen(string); i <= j; i++)
    {
        if (string[i] >= 46 && string[i] <= 58)
        {
            x+=1;
        }
    }
public OnPlayerText
pawn Код:
if(TentouDivulgar(text))
    {
        if(cdivulgar[playerid] >= 4)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Nгo divulgue servidores aqui!");
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
            PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
            Kick(playerid);
        }
        format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,PlayerName(playerid),text);
        ABroadCast(COLOR_YELLOW,string,1);
        DivulgouLog(string);
        cdivulgar[playerid] += 1;
        return 0;
    }
Provalvelmente vai dar algum erro, se der, espero que algum outro membro consigo resolvк-lo, pois jб estou de saida. Poste aqui o erro, de qualquer forma.
Reply


Messages In This Thread
Sistema de divulgaзao - by Jao_Victor - 03.08.2012, 01:46
Re: Sistema de divulgaзao - by Shum493 - 03.08.2012, 01:58
Re: Sistema de divulgaзao - by Diogo123 - 03.08.2012, 01:58
Re: Sistema de divulgaзao - by leonardo1434 - 03.08.2012, 02:04
Re: Sistema de divulgaзao - by PawnoBrasil[xPBx] - 03.08.2012, 02:06
Re: Sistema de divulgaзao - by Jao_Victor - 03.08.2012, 02:08
Respuesta: Sistema de divulgaзao - by [JD]BlackFire - 03.08.2012, 02:09
Re: Sistema de divulgaзao - by Jao_Victor - 03.08.2012, 02:10
Re: Sistema de divulgaзao - by PawnoBrasil[xPBx] - 03.08.2012, 02:15
Re: Sistema de divulgaзao - by Shum493 - 03.08.2012, 20:00

Forum Jump:


Users browsing this thread: 3 Guest(s)