Jump to content
  • 0

rentcar


Waller.

Question

6 answers to this question

Recommended Posts

  • 0

aici codul 

CMD:rentcar(playerid,params[]){

    if(!PlayerToPoint(10.0, playerid,542.3743,-1282.0509,17.2422)) return 1;
             if(RentVehicle[playerid] != 0) return SCM(playerid,-1,"Ai deja un vehicul inchiriat");

             ShowPlayerDialog(playerid, DIALOG_RENT, DIALOG_STYLE_LIST, "Rent Car","Infernus\nSultan\nCheetah\nBuffalo\nBanshee\nVoodo" , "Select","Cancel");


return 1;

}

 

Link to comment
Share on other sites

  • 0
Acum 1 minut, Waller669 a spus:

aici codul 

CMD:rentcar(playerid,params[]){

    if(!PlayerToPoint(10.0, playerid,542.3743,-1282.0509,17.2422)) return 1;
             if(RentVehicle[playerid] != 0) return SCM(playerid,-1,"Ai deja un vehicul inchiriat");

             ShowPlayerDialog(playerid, DIALOG_RENT, DIALOG_STYLE_LIST, "Rent Car","Infernus\nSultan\nCheetah\nBuffalo\nBanshee\nVoodo" , "Select","Cancel");


return 1;

}

 

Ai zis cand dai pe masina iti pica sv nu cand dai /rentcar iti pica, deci am nevoie doar de DIALOG_RENT.

Link to comment
Share on other sites

  • 0

asta ? 


         case DIALOG_RENT: {
        if(!response) return 1;
        SetPVarInt(playerid, "listitem", listitem);
        new string[64];
        format(string,sizeof(string),"Pentru cate minute vrei sa inchiriezi un vehicul?\nPret;$%d/minut",RENT_PRICE);
        ShowPlayerDialog(playerid, DIALOG_RENT+1, DIALOG_STYLE_INPUT, "Rent Car", string, "Select", "Cancel");
    }

    case DIALOG_RENT+1:{
    if(!response) return 1;
    listitem = GetPVarInt(playerid, "listitem");
        new minutes  = strval(inputtext),string[128],carid;
    if(minutes < 1 || minutes > 30) return SCM(playerid,-1,"Poti inchiria un vehicul intre 1 si 30 de minute");
    if(GetPlayerMoney(playerid) < minutes  * RENT_PRICE) return SCM(playerid,-1,"Nu detii suma necesara de bani");
        GivePlayerCash(playerid,- minutes*RENT_PRICE);
                Update(pCashx);
       switch(listitem){
              case 0:{
                  format(string,sizeof(string),"Ai inchiriat un infernus pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(411, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);


              }

              case 1:{
                  format(string,sizeof(string),"Ai inchiriat un sultan pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(560, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);


              }

                 case 2:{
                  format(string,sizeof(string),"Ai inchiriat un cheetah pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(415, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);


              }


                 case 3:{
                  format(string,sizeof(string),"Ai inchiriat un buffalo pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(402, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);


              }

                    case 4:{
                  format(string,sizeof(string),"Ai inchiriat un banshee pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(429, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);


              }

                            case 5:{
                  format(string,sizeof(string),"Ai inchiriat un voodo pentru %d minute si ai platit $%d",minutes,minutes*RENT_PRICE);
                  RentVehicle[playerid] = CreateVehicle(412, 542.3743,-1282.0509,17.2422, 90, -1, -1,300);

              }

       }
       RentVehicle[playerid] = 1;
       PlayerTimer[playerid] = SetTimer("RentCar", 60000 * minutes, false,"%d",playerid);
       SCM(playerid, -1 ,string);
    }
 

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.