Jump to content
  • 0

Cum bag job nou?Comanda [/getgift] si [/job]


Rafael.

Question

7 answers to this question

Recommended Posts

  • 0

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;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.