[Ajuda] com o /anuncio porfavor
#1

Ta dando esse erro ai no meu /anuncio
LINHA COM ERRO
pawn Код:
if(GetTickCount() - FloodAn[playerid] < 80000)
OS ERROS
pawn Код:
(17917) : error 017: undefined symbol "FloodAn"
(17917) : warning 215: expression has no effect
(17917) : error 001: expected token: ";", but found "]"
(17917) : error 029: invalid expression, assumed zero
(17917) : fatal error 107: too many error messages on one line
O COMANDO INTEIRO
pawn Код:
if(strcmp(cmd, "/anuncio", true) == 0 || strcmp(cmd, "/an", true) == 0)
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Voce nao esta logado!");
            return 1;
        }

        GetPlayerName(playerid, sendername, sizeof(sendername));
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' '))
        {
            idx++;
        }
        new offset = idx;
        new result[126];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
        {
            result[idx - offset] = cmdtext[idx];
            idx++;
        }
        result[idx - offset] = EOS;
        if(!strlen(result))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "USE: (/an)uncio [Texto do Anuncio]");
            return 1;
        }
        new payout = idx * 10;
        if(GetPlayerMoney(playerid) < payout)
        {
            format(string, sizeof(string), "* Voce usou %d caracteres que custou $%d, voce nao possui essa grana.", offset, payout);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            return 1;
        }
        if(GetTickCount() - FloodAn[playerid] < 80000)
        {
            format(string, sizeof(string), "   Espere %d segundos para um novo anuncio!",80-(GetTickCount() - FloodAn[playerid])/1000);
            SendClientMessage(playerid, COLOR_GRAD2, string);
            return 1;
        }

        format(string, sizeof(string), "Anъncio Global: %s, por: %s (%s), ID %d, Celular %d.",result, sendername,NomeORG(playerid),playerid,PlayerInfo[playerid][pPnumber]);
        GivePlayerMoney(playerid, - payout);
        SBizzInfo[7][sbTill] += payout;
        ExtortionSBiz(7, payout);
        SendClientMessageToAll(GetPlayerColor(playerid),string);
        format(string, sizeof(string), "~r~Pagou $%d~n~~w~Mensagem continha: %d Caracteres", payout, idx);
        GameTextForPlayer(playerid, string, 5000, 5);
        FloodAn[playerid] = GetTickCount();

        return 1;
    }
Reply


Messages In This Thread
com o /anuncio porfavor - by Hyuuga - 14.04.2013, 11:20
Re: com o /anuncio porfavor - by bruxo00 - 14.04.2013, 11:25
Re: com o /anuncio porfavor - by Hyuuga - 14.04.2013, 11:28
Re: com o /anuncio porfavor - by iStronG - 14.04.2013, 11:44
Re: com o /anuncio porfavor - by bruxo00 - 14.04.2013, 11:48
Re: com o /anuncio porfavor - by CaozinhoDosCorre - 14.04.2013, 11:50
Re: com o /anuncio porfavor - by Hyuuga - 14.04.2013, 12:06
Re: com o /anuncio porfavor - by Hyuuga - 14.04.2013, 12:13
Re: com o /anuncio porfavor - by bruxo00 - 14.04.2013, 12:15
Re: com o /anuncio porfavor - by Hyuuga - 14.04.2013, 12:21

Forum Jump:


Users browsing this thread: 3 Guest(s)