Detaljan opis problema: znaci kad kreiram vozilo pomocu cmd /kreirajvozilo to se stvori napravi restart srv odem do tog vozila ne pise da je vozilo na prodaju i ne izbaci dialog kad udem u vozilo da mogu ono kupi i odustani
Dio skripte:
//VEH SISTEM
for(new b = 0; b < sizeof(CI); b++)
{
new gFile;
format(gFile, sizeof(gFile), "BExtra/Vozila/Vozilo_%d.ini", b);
if(fexist(gFile))
{
INI_ParseFile(gFile, "UcitajVozila", .bExtra = true, .extra = b);
if(CI == 1)
{
DodajVozilo(CI,CI,CI,CI+1.0,CI,CI,CI,60000);
SetVehicleVirtualWorld(b, CI);
SetVehicleNumberPlate(b,CI);
if(CI == 0)
{
new stsr;
new Float:x,Float:y,Float:z;
GetVehiclePos(b, x,y,z);
new model;
GetVehicleName(b,model,sizeof(model));
format(stsr,sizeof(stsr),""ORANGE"Vozilo na prodaju!\n"BELA"%s\n"ORANGE"Cena: "BELA"%d$\n"ORANGE"Udjite u vozilo i pritisnite 'Kupi'",model,CI);
CarLabel = Create3DTextLabel(stsr, BELA2, x, y, z, 10, 0, 1);
Attach3DTextLabelToVehicle(CarLabel,b,0,0,0);
}
}
}stock VehLabelUpdate(b)
{
if(CI == 0)
{
Delete3DTextLabel(CarLabel);
new stsr;
new Float:x,Float:y,Float:z;
GetVehiclePos(b, x,y,z);
new model;
GetVehicleName(b,model,sizeof(model));
format(stsr,sizeof(stsr),""ORANGE"Vozilo na prodaju!\n"BELA"%s\n"ORANGE"Cena: "BELA"%d$\n"ORANGE"Udjite u vozilo i pritisnite 'Kupi'",model,CI);
CarLabel = Create3DTextLabel(stsr, BELA2, x, y, z, 10, 0, 1);
Attach3DTextLabelToVehicle(CarLabel,b,0,0,0);
}
else if(CI == 1)
{
Delete3DTextLabel(CarLabel);
}
return true;
}
