Jump to content
  • 0

Question

Posted

[pawn] if(strcmp(cmd,"/get",true)==0)

    {

        if(IsPlayerConnected(playerid))

    {

new x_job[256];

x_job = strtok(cmdtext, idx);

if(!strlen(x_job)) {

SendClientMessage(playerid, COLOR_GREEN, "__________________ Get __________________");

SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /get [name]");

  SendClientMessage(playerid, COLOR_GREY, "» Nume: Drugs, Fuel, Crack");

SendClientMessage(playerid, COLOR_GREEN, "__________________ Get __________________");

return 1;

}

    if(strcmp(x_job,"drugs",true) == 0)

{

        if(PlayerInfo[playerid][pDrugs] > 15)

        {

            format(string, sizeof(string), ": Mai ai %d grame, care trebuie sa le vinzi.", PlayerInfo[playerid][pDrugs]);

SendClientMessage(playerid, COLOR_GREY, string);

            return 1;

        }

        new tel;

    new price;

    new ammount;

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /get drugs [ammount]");

return 1;

}

    if (PlayerInfo[playerid][pJob] == 4 && PlayerToPoint(2.0, playerid, 333.6873,1124.8654,1083.8903))

{

    price = ammount * tel;

    if(GetPlayerMoney(playerid) > price)

    {

        format(string, sizeof(string), ": Ai cumarat %d grame cu %d$.", ammount, price);

SendClientMessage(playerid, COLOR_1BLUE, string);

        GivePlayerMoney(playerid, -price);

PlayerInfo[playerid][pDrugs] = ammount;

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, dar nu va puteti permite droguri.");

        return 1;

    }

}

else

{

    SendClientMessage(playerid, COLOR_GREY, ": Nu ai Job-ul Drugs Dealer sau nu esti in Casa de droguri.");

    return 1;

}

}

else if(strcmp(x_job,"crack",true) == 0)

{

        if(PlayerInfo[playerid][pCrack] > 15)

        {

            format(string, sizeof(string), ": Mai ai %d grame care trebuie sa le vinzi.", PlayerInfo[playerid][pCrack]);

SendClientMessage(playerid, COLOR_GREY, string);

            return 1;

        }

        new tel;

    new price;

    new ammount;

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: /get crack [ammount]");

return 1;

}

    if (PlayerInfo[playerid][pJob] == 4 && PlayerToPoint(2.0, playerid, 333.6873,1124.8654,1083.8903))

  {

    price = ammount * tel;

    if(GetPlayerMoney(playerid) > price)

    {

        format(string, sizeof(string), ": Ai cumparat %d grame cu %d$.", ammount, price);

SendClientMessage(playerid, COLOR_1BLUE, string);

        GivePlayerMoney(playerid, -price);

PlayerInfo[playerid][pCrack] = ammount;

    }

    else

    {

        SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, dar nu va puteti permite droguri.");

        return 1;

    }

}

else

{

    SendClientMessage(playerid, COLOR_GREY, ": Ne pare rau, dar nu aveti Job-ul Drugs Dealer.");

    return 1;

}

}

else if(strcmp(x_job,"fuel",true) == 0)

{

    if(IsAtGasStation(playerid))

{

    new price = 20 * SBizzInfo[3][sbEntranceCost];

    format(string, sizeof(string), "» Ai cumparat 20% Fuel, si te costa %d$.",price);

    SendClientMessage(playerid, COLOR_1BLUE, string);

    PlayerInfo[playerid][pFuel] = 20;

GivePlayerMoney(playerid, - price);

return 1;

}

else

{

SendClientMessage(playerid,COLOR_GREY,": Ne pare rau, dar nu esti intr-o Benzinarie.");

return 1;

}

}

else { return 1; }

}//not connected

return 1;

}[/pawn]

[pawn]problema este ca ma duc la casa de droguri scriu /get drugs 6 sau /get crack 6    6 reprezinta cat de multe droguri pot sa iau[/pawn]

[pawn]dar problema e ca nu imi da nimic imi zice tu ai cumparat 0 grame cu 0$ ce pot face ?[/pawn]

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • 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.