Jump to content
  • 0

problema script


Ursachi

Question

revin cu o noua problema sper sa nu fiu stresant dar nustiu la cine alcineva a apelez deci:am gasit un script care are  cand scri /v are (/v lock /v sell /vcolor /v selllui dar /v buy si nu exzista nici o masina in nici un showroom folosesc acest gamemod:

http://forum.sa-mp.com/showthread.php?t=178482

am si testat comanda /v buy nu exzista

Multumesc anticipat

Dovada:

25670490.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

        else if(strcmp(x_nr,"buy",true) == 0)

        {

            if(IsAnOwnableCar(idcar))

            {

                if(PlayerInfo[playerid][pLevel] < 2)

    {

                    SendClientMessage(playerid, COLOR_GREY, "You need to be level 2 to buy a vehicle!");

                    return 1;

    }

  if(SBizzInfo[1][sbProducts] == 0)

{

GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);

return 1;

}

    if(PlayerInfo[playerid][pPcarkey] == 999) { }

    else if(PlayerInfo[playerid][pPcarkey2] == 999) { }

    else if(PlayerInfo[playerid][pPcarkey3] == 999) { }

    else { SendClientMessage(playerid, COLOR_GREY, "  You already own 3 vehicles"); return 1; }

if(CarInfo[idcar][cOwned]==1)

{

    SendClientMessage(playerid, COLOR_GREY, "Someone already owns this car");

    return 1;

}

if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])

{

    if(PlayerInfo[playerid][pPcarkey] == 999) { PlayerInfo[playerid][pPcarkey] = idcar; }

    else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; }

    else if(PlayerInfo[playerid][pPcarkey3] == 999) { PlayerInfo[playerid][pPcarkey3] = idcar; }

    else { return 1; }

CarInfo[idcar][cOwned] = 1;

GetPlayerName(playerid, sendername, sizeof(sendername));

strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);

SafeGivePlayerMoney(playerid,-CarInfo[idcar][cValue]);

SBizzInfo[1][sbTill] += 5000;

ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);

SBizzInfo[1][sbProducts]--;

PlayerPlayMusic(playerid);

GameTextForPlayer(playerid, "~w~Congratulations~n~Don't forget to /v park it!", 5000, 3);

SendClientMessage(playerid, COLOR_GRAD2, "Congratulations on your new purchase!");

SendClientMessage(playerid, COLOR_GRAD2, "Type /vehiclehelp to view the vehicle manual!");

SendClientMessage(playerid, COLOR_YELLOW2, "You can start the engine up now !");

gEngine[playerid] = 0;

engineOn[GetPlayerVehicleID(playerid)] = false;

DateProp(playerid);

OnPropUpdate();

OnPlayerUpdate(playerid);

return 1;

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "  You don't have enough cash with you ! ");

    return 1;

}

            }

        }

        else

        {

            SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]");

            SendClientMessage(playerid, COLOR_WHITE, "Available names: park, lock(1-3), sell, sellto, color");

            return 1;

        }

    }

    return 1;

}

pui asta sub lock3 incearca.

Daca ti-am fost de ajutor +1 Respect!Multumesc

Link to comment
Share on other sites

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.