[Ajuda] Ajuda /bonus
#1

Ola Eu tenho na minha Gm esse cmd mas nao ta funcionando ex prefeito da /setarbonus e seta d boas mas quando da /bonus no local diz que o prefeito nao setou o bonus n sei oq ta de errado

pawn Код:
if(strcmp(cmd,"/setarbonus",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pLider] == 7)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USE: /setarbonus [quantidade]");
                    return 1;
                }
                new extorcao;
                extorcao = strval(tmp);
                if(extorcao < 50 || extorcao > 100) { SendClientMessage(playerid, COLOR_GREY, "O Dinheiro que sera tirado pelos players no bonus nгo pode ser - que R$50 ou + que R$100"); return 1; }
                Tax1 = extorcao;
                format(gstring, sizeof(gstring), "> Bonus a ser pego por player agora sera R$%d, daqui em diante.", Tax1);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
                format(gstring, sizeof(gstring), "Notнcias: O Prefeito acaba de mudar o Bonus do Dia para R$%d.", Tax1);
                SendClientMessageToAll(COLOR_LIGHTBLUE, gstring);
                dini_IntSet("CofreOrg/Org7.ini","Bonus",Tax1);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo й o Prefeito!");
                return 1;
            }
        }
        return 1;
    }
    if (strcmp(cmd, "/bonus", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerToPoint(5.0,playerid,358.5072,168.9830,1008.3828))
            {
                if(PegaPresente[playerid] == 0)
                {
                     if(dini_Isset("CofreOrg/Org7.ini","Bonus"))
                     {
                        new Bonus = dini_Int("CofreOrg/Org7.ini","Bonus"); Bonus += 50;
                        //Extas
                        if(IsACop(playerid)){ Bonus += 50; }
                        if(PlayerInfo[playerid][pCargo] > 0){ Bonus += 10; }
                        if(PlayerInfo[playerid][pEmprego] > 0){ Bonus += 20; }
                        if(PlayerInfo[playerid][pCash1] > 0){ Bonus += 100; }
                        //
                        if(dini_Int("CofreOrg/Org7","Total") >= Bonus)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "> Prefeitura: %s acabou de pegar o seu Bonus do Dia.", sendername);
                            SendClientMessageToAll(COR_PRE,string);
                            format(gstring, sizeof(gstring), "> Prefeitura: vocк recebeu serca de R$%d de Bonus.", Bonus);
                            SendClientMessage(playerid,COR_PRE,gstring);
                            PegaPresente[playerid] = 1;
                            //ChecaTempoExp(playerid);
                            PlayerInfo[playerid][pPayDay] ++;
                            GranaRockstar(playerid, Bonus);
                            Emposto=dini_Int("CofreOrg/Org7.ini","Total");
                            Emposto-=Bonus;
                            dini_IntSet("CofreOrg/Org7.ini","Total",Emposto);
                            return 1;
                         }
                         else{ SendClientMessage(playerid,COLOR_GRAD1," O Cofre da Prefeitura nгo tem dinheiro suficiente!"); }
                     }
                     else{ SendClientMessage(playerid,COLOR_GRAD1," O Prefeito ainda nгo seto o valor que sera o Bonus!"); }
                }
                else{ SendClientMessage(playerid, COLOR_GRAD1, " Vocк ja pego o bonus, espere ate o proximo PayDay para pegar novamente!!"); }
            }
            else{ SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб dentro da Prefeitura!!"); }
        }
        return 1;
    }
Reply


Messages In This Thread
Ajuda /bonus - by zGuigui2068 - 07.04.2016, 22:39
Re: Ajuda /bonus - by Pxndx - 08.04.2016, 05:18
Re: Ajuda /bonus - by F1N4L - 08.04.2016, 11:25
Re: Ajuda /bonus - by zGuigui2068 - 08.04.2016, 18:32
Re: Ajuda /bonus - by BykiLler - 08.04.2016, 19:02
Re: Ajuda /bonus - by Pxndx - 08.04.2016, 20:44
Re: Ajuda /bonus - by zGuigui2068 - 08.04.2016, 21:46
Re: Ajuda /bonus - by Pxndx - 09.04.2016, 03:34
Re: Ajuda /bonus - by zGuigui2068 - 09.04.2016, 08:15
Re: Ajuda /bonus - by RodrigoMSR - 09.04.2016, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)