Jump to content

Rafael.

Membru
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Rafael.

  1. Uite problema de la GetGift 

    Quote

    //=============================================================================================================================================================
    // = Comanda: /getgift
    //=============================================================================================================================================================
        if(strcmp(cmd,"/getgift", true) == 0
     {
        if(playerid);
        if(playerVariable[playerid][pPlayingHours] >= 3);
        {
            if(assetVariables[1][aAssetValue] == 1)
            {
                if(IsPlayerInRangeOfPoint(playerid, 15.0, 1123.7257,-1468.3381,15.7514))
                {
                    format(szMessage, 256, "Poti folosi /getgift peste %d ore.", playerVariables[playerid][pGiftHours]);
                    if(playerVariables[playerid][pGiftHours] == 0)
                    {
                        new gift = random(10);
                        if(gift == 0)
                        {
                            playerVariables[playerid][pRPoints] += 5;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 5 respect points-uri la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 5 respect points at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 1)
                        {
                            new cash = random(1000000);
                            playerVariables[playerid][pMoney] += cash;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat o suma de bani la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won $%s at giftbox. ))",GetName(playerid), NumberFormat(cash));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 2)
                        {
                            playerVariables[playerid][pRobPoints] += 100;
                            if(playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5)
                            {
                                SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 100 lawer points-uri la giftbox.");
                                format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 100 lawer points at giftbox.  ))",GetName(playerid));
                                SCMTA(COLOR_LIGHT,szMessage);
                            }
                            else
                            {
                                SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 100 rob points-uri la giftbox.");
                                format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 100 rob points at giftbox.  ))",GetName(playerid));
                                SCMTA(COLOR_LIGHT,szMessage);
                            }
                        }
                        if(gift == 3)
                        {
                            playerVariables[playerid][pDriveLicense] += 500;
                            playerVariables[playerid][pGunLicense] += 500;
                            playerVariables[playerid][pFlyLicense] += 500;
                            playerVariables[playerid][pBoatLicense] += 500;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat inca 500 de ore la fiecare licenta de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 5 respect points at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 4)
                        {
                            playerVariables[playerid][pWarns] = 0;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat clear warns de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won a warns clear at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                            new str[128];
                            format(str,128,"UPDATE playeraccounts SET playerVIP = 0 WHERE playerID = %d",playerVariables[playerid][pInternalID]);
                            mysql_tquery(handle, str);
                        }
                        if(gift == 5)
                        {
                            playerVariables[playerid][pMaterials] += 100000;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 100.000 materiale de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 100.000 materials at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 6)
                        {
                            playerVariables[playerid][pFPunish] = 0;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat clear FP de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won a clear FP at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 7)
                        {
                            playerVariables[playerid][pLevel] ++;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat un level up de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won a level up at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 8)
                        {
                            new cash = random(69);
                            playerVariables[playerid][pPremiumPoints] += cash;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat puncte premium la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won %d premium points at giftbox. ))",GetName(playerid), cash);
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        if(gift == 9)
                        {

                            playerVariables[playerid][pDrugs] += 100000;
                            SendClientMessage(playerid, COLOR_WHITE, "Ai castigat 100.000 droguri de la giftbox.");
                            format(szMessage, sizeof(szMessage), "(( AdmBot says: %s won 100.000 drugs at giftbox. ))",GetName(playerid));
                            SCMTA(COLOR_LIGHT,szMessage);
                        }
                        playerVariable[playerid][pGiftHours] = 4;
                    }
                    else SCM(playerid,COLOR_YELLOW, szMessage);
                }
                else
                {
                    SCM(playerid,COLOR_WHITE, "You are not at giftbox location. Go to checkpoint.");
                    SetPlayerCheckpoint(playerid, 1123.7257,-1468.3381,15.7514, 2);
                }
            }
            else SCM(playerid,COLOR_YELLOW,"The gift is not active.");
        }

        else SCM(playerid,COLOR_WHITE, "Ai nevoie de 3 ore jucate pentru a folosi comanda /getgift.");
        return 1;
    }

     

  2.  = Comanda: /ram
    //=============================================================================================================================================================
        if(strcmp(cmd, "/ram", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                if(gTeam[playerid] == 1)
                {
                    for(new i = 0; i < sizeof(HouseInfo); i++)
                    {
                        if (PlayerToPoint(3, playerid,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]))
                        {
                            SetPlayerInterior(playerid,HouseInfo[hInt]);
                            SetPlayerPos(playerid,HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz]);
                            GameTextForPlayer(playerid, "~r~Ai spart ~g~Usa", 5000, 1);
                            PlayerInfo[playerid][pInt] = HouseInfo[hInt];
                            PlayerInfo[playerid][pLocal] = i;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "{30a030}[Server]: {ffffff}Ne pare rau, dar nu faci parte din factiunea {000cff}LSPD{ffffff}, {000cff}NG {ffffff}sau {000cff}FBI{ffffff}.");
                    return 1;
                }
            }
            return 1;
        }

     

    Ajutor va rog:)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.