Jump to content
  • 0

Problema GM BUGGED


david1995

Question

5 answers to this question

Recommended Posts

  • 0

Nu ma supar daca imi arati si comanda :)

Asta ii comanda 

​CMD:getdrugs(playerid, params[])
{
    new amount,string[256];
    if(jobVariables[playerVariables[playerid][pJob]][jJobType] == 5)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5, 247.9920,302.1944,999.1484))
        {
            if(sscanf(params, "d", amount)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/getdrugs [amount]");
        {
            new cash = amount * 1;
            if(playerVariables[playerid][pMoney] >= cash)
            {
                 playerVariables[playerid][pMoney] -= cash;
                 playerVariables[playerid][pDrugs] += amount;
                 format(string,256,"Ai cumparat %d grame de droguri din Crack House.",amount);
                 SCM(playerid, COLOR_TEAL,string);
            }                  
        }    
        }
    }
    else if(playerVariables[playerid][pGroup] == 6 || playerVariables[playerid][pGroup] == 7 || playerVariables[playerid][pGroup] == 8 || playerVariables[playerid][pGroup] == 9 || playerVariables[playerid][pGroup] == 10 || playerVariables[playerid][pGroup] == 11)
    {
        if(sscanf(params, "d", amount)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/getdrugs [amount]");
        {
            if(IsPlayerInRangeOfPoint(playerid, 100.0, groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][0], groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][1], groupVariables[playerVariables[playerid][pGroup]][gGroupInteriorPos][2]))
            {
                if(groupVariables[playerVariables[playerid][pGroup]][gSafe][2] > amount)
                {
                    if(amount <= 15)
                    {
                        groupVariables[playerVariables[playerid][pGroup]][gSafe][2] -= amount;
                        playerVariables[playerid][pDrugs] += amount;
                        format(string,256,"Ai cumparat %d grame de droguri din HQ.",amount);
                        SCM(playerid, COLOR_WHITE, string);
                    }
                    else return SCM(playerid,COLOR_WHITE,"Nu poti cupara mai mult de 15g de droguri.");
                }
                else return SCM(playerid,COLOR_WHITE,"Factiunea ta nu are suficiente droguri in seif.");
            }
            else return SCM(playerid,COLOR_WHITE,"Nu esti in HQ.");
        }
    }
    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.