[help] vip system
#4

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
Here it, is:
pawn Код:
if(strcmp(cmd, "/pegarmoedasbrl", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMoedaBR] < 500)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USE: /pegarMoedasBRL [Numero] [Codigo Secreto]");
                SendClientMessage(playerid, COLOR_GRAD5, "Codigo: Codigo e recebido apos a confirmaзгo de um pagamento de KitVIP via MP!");
                return 1;
            }
            new numeroid;
            numeroid = strval(tmp);
            if(numeroid < 1 || numeroid > 999999999)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Numeros de 1 a 999.999.999");
                return 1;
            }
           
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "USE: /pegarMoedasBRL [Numero] [Codigo Secreto]");
                SendClientMessage(playerid, COLOR_GRAD5, "Codigo: Codigo e recebido apos a confirmaзгo de um pagamento de KitVIP via MP!");
                return 1;
            }
           
            //Funзгo
            new onumero[256];
            format(onumero, sizeof(onumero), "CodigosVIP/%d.cfg", numeroid);
            if(dini_Exists(onumero))
            {
                new ocodigo[256];
                strmid(ocodigo, dini_Get(onumero,"Codigo"), 0, strlen(dini_Get(onumero,"Codigo")), 255);
                if(strcmp(ocodigo, result, true) == 0)
                {
                    ClearChatbox(playerid, 10);
                    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
                    PlayerInfo[playerid][pMoedaBR] += dini_Int(onumero,"MoedasBR");
                    format(string, sizeof(string), "> Recebimento de VIP Secreto [ Numero: %d | Codigo: %s ] OKs", numeroid, result);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                    format(string, sizeof(string), "> KIT de MoedasBRL: %s | Quantidade: %s | Total: %d | Mais Informaзхes /MoedaBRL, Bom USO!", dini_Get(onumero,"KIT"), dini_Get(onumero,"MoedasBR"), PlayerInfo[playerid][pMoedaBR]);
                    SendClientMessage(playerid, COLOR_YELLOW, string);
                   
                    format(string, sizeof(string), "AdminCmd[%s:%d] Acabou de Pegar Seu KIT VIP [%s-%sm] Com o Metodo Secreto.", Nome(playerid), playerid, dini_Get(onumero,"KIT"), dini_Get(onumero,"MoedasBR"));
                    MensagemAdmin(COLOR_GRAD1,string,1);
                   
                    dini_Remove(onumero);
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_CV, "> Codigo Invalido, Atenзгo: Se Errar 3 Vezes Sera Desconectado.!");
                    SendClientMessage(playerid, COLOR_GRAD3, "> Comprou VIP? Mandou a MP com as Informaзхes? O pagamento ja foi confirmado?");
                    SendClientMessage(playerid, COLOR_GRAD3, "> Caso Tudo OK Verifique Sua Caixa de Entrada no Forum e Pegue seu Codigo Secreto");
                    SendClientMessage(playerid, COLOR_GRAD3, "> E Ative seu VIP Corretamente, Caso de Abusos de Bug Banimento Imediato!");
                   
                    format(string, sizeof(string), "AdminCmd[%s:%d] Esta Tentando Pegar MoedasBRL Com Metodo Secreto, Atenзгo !", Nome(playerid), playerid);
                    MensagemAdmin(COLOR_GRAD1,string,1);
                   
                    PegandoMoedaBR[playerid] += 1;
                    if(PegandoMoedaBR[playerid] >= 3)
                    {
                        Kick(playerid);
                    }
                    return 1;
                }
            }
Try to ident by yourself next time
I dont know Spain/Italy/watherver is, so I dont know what those texts say...
Whoa. Totally missed the forgien language part. Hope someone in the community will help you. Good luck.
Reply


Messages In This Thread
[help] vip system - by fdsda - 24.09.2014, 04:22
Re: [help] vip system - by canadianclass - 24.09.2014, 05:10
Re: [help] vip system - by XStormiest - 24.09.2014, 05:26
Re: [help] vip system - by canadianclass - 24.09.2014, 05:34

Forum Jump:


Users browsing this thread: 2 Guest(s)