[Pomoc] Kupnja vozila,kupac moze voziti auto u izlogu

Započeo kristiankico, Mart 12, 2012, 10:37:06 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: CLRP
Detaljan opis problema: Znaci neko sjedne u auto za kupnju i nemora ga kupiti a moze ga voziti,ali ja bih htio samo kad on sjedne da ga zaledi da on nemoze nista osim da moze kucati /kupivozilo i da moze izaci
Dio skripte: if(strcmp(cmd, "/kupivozilo", true) == 0)
{
    if (Spectating[playerid][0]!=-1)
    {
        if (Carlist[playerid][Typ]==-1)
        {
            new price = Buylist[Spectating[playerid][0]][Price];
            if (price <= GetPlayerCash(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;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): ako bude potrebno staviti cu