Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

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


Question

7 answers to this question

Recommended Posts

  • 0
Posted

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

 

  • 0
Posted

Problema e la primele: 

Quote

 {
    if(playerid);
    if(playerVariable[playerid][pPlayingHours] >= 3);

 

  • 0
Posted
La 01.11.2015 la 17:19, Rafael. a spus:

Problema e la primele:   if(playerVariable[playerid][pPlayingHours] >= 3);

 

Ce GM folosesti sa stiu.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.