[Pomoc]Vozila

Započeo ♥ BMW ♥, Februar 09, 2012, 12:26:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: edit
Detaljan opis problema: Kada neko kupi auto, ne oduzmu mu se pare :/
Dio skripte: Evo komanda
Citatif(strcmp(cmd, "/kupivozilo", true) == 0)
   {
       if (Spectating[playerid][0]!=-1)
       {
           if (Carlist[playerid][Typ]==-1)
           {
               new price = Buylist[Spectating[playerid][0]][Price];
               if (price <= GetPlayerMoney(playerid))
               {
                   new autohaus=Buylist[Spectating[playerid][0]][Autohaus];
                    GivePlayerMoney(playerid, - price);
                    Carlist[playerid][Typ] = Spectating[playerid][0]; Carlist[playerid][X3] = Carspawns[autohaus][X3]; Carlist[playerid][Y3] = Carspawns[autohaus][Y3];
               Carlist[playerid][Z3] = Carspawns[autohaus][Z3]; Carlist[playerid][Rotation] = Carspawns[autohaus][Rotation]; Carlist[playerid][Status] = 1; Carlist[playerid][Lock] = 0;
               Carlist[playerid][Carid] = CreateVehicle(Buylist[Spectating[playerid][0]][Modelid],Carlist[playerid][X3],Carlist[playerid][Y3],Carlist[playerid][Z3],Carlist[playerid][Rotation],-1,-1,-1);
                 SetVehicleParamsForAll(Buylist[Spectating[playerid][0]][Carid],0,0);
                 TogglePlayerControllable(playerid,1);
                 Spectating[playerid][0]=-1;
                 RemovePlayerFromVehicle(playerid);
                 VehicleSave(playerid);
                 TextDrawHideForPlayer(playerid, imevozila[playerid]);
               TextDrawHideForPlayer(playerid, cijenavozila[playerid]);
               TextDrawHideForPlayer(playerid, registracijavozila[playerid]);
               format(string,128,"* Cestitamo! Kupili ste auto {FFFFFF}$%s "COL_YELLOW"za {FFFFFF}%i!",Buylist[Carlist[playerid][Typ]][Name],price);
               SendClientMessage(playerid, YELLOW, string);
               SendClientMessage(playerid, NICERED, "Ako je vas auto pokvaren, upisite {FFFFFF}/v fix "COL_RED"da popravite.");
               SendClientMessage(playerid, NICERED, "Mozete otkljucati/zakljucati vas auto sa naredbom {FFFFFF}/v lock.");
               SendClientMessage(playerid, NICERED, "Ostalo: {FFFFFF}(/v)ozilo.");
                    SendClientMessage(playerid, COLOR_YELLOW, "Vase vozilo je dostavljeno, Uzivajte!");
            }
                else { format(string, 128, "* Nedovoljno novca za kupnju automobila (trebate: {FFFFFF}$%i)!", price); SendClientMessage(playerid, YELLOW, string); }
         }
         else { SendClientMessage(playerid, COLOR_GREY, "Vi vec imate auto!"); }
       }
       else { SendClientMessage(playerid, COLOR_GREY, "Nisi u izlozbenom vozilu!"); }
       return 1;
   }


Village's Roleplay USKORO...

Village's Roleplay USKORO...

Ispod

SendClientMessage(playerid, COLOR_YELLOW, "Vase vozilo je dostavljeno, Uzivajte!");

dodaj

GivePlayerMoney(playerid, -price);

Opet ne oduzima pare :/


Village's Roleplay USKORO...

Village's Roleplay USKORO...