stock LoadKocsik(){ for(new i=1; i<MAX_VEHICLES;i++) { new vFile[32]; format(vFile,sizeof(vFile),\"/BCRP/Kocsik/%d.ini\",i); if(fexist(vFile)) { INI_ParseFile(vFile, \"LoadVehicle\", .bExtra = true, .extra = i); jmvk++; } } if(jmvk < 1) print(\"Nem lett jármű betöltve\"); return 1;}forward LoadVehicle(vid, name[], value[]);public LoadVehicle(vid, name[], value[]){ new vFile[32]; format(vFile, sizeof(vFile),\"/BCRP/Kocsik/%d.ini\",vid); INI_Int(\"Tipus\",vInfo[vid][jTipus]); INI_Float(\"PosX\",vInfo[vid][jPosX]); INI_Float(\"PosY\",vInfo[vid][jPosY]); INI_Float(\"PosZ\",vInfo[vid][jPosZ]); INI_Float(\"PosAngle\",vInfo[vid][jPosRotate]); new kocsi = AddStaticVehicleEx(vInfo[vid][jTipus],vInfo[vid][jPosX],vInfo[vid][jPosY],vInfo[vid][jPosZ],vInfo[vid][jPosRotate],1,1,NINCS); INI_Int(\"PosInt\",vInfo[vid][jInt]); INI_Int(\"PosVW\",vInfo[vid][jVW]); INI_Int(\"Frakcio\",vInfo[vid][jFrakcio]); INI_Int(\"Munka\",vInfo[vid][jMunka]); INI_Int(\"FuelType\",vInfo[vid][jFuelType]); INI_Int(\"Fuel\",vInfo[vid][jFuel]); INI_Bool(\"Zarva\",vInfo[vid][jLocked]); INI_Int(\"Szin1\",vInfo[vid][jColor2]); INI_Int(\"Szin2\",vInfo[vid][jColor2]); INI_Int(\"PaintJob\",vInfo[vid][jPaintJob]); INI_Int(\"Comp1\",vInfo[vid][jComp1]); INI_Int(\"Comp2\",vInfo[vid][jComp2]); INI_Int(\"Comp3\",vInfo[vid][jComp3]); INI_Int(\"Comp4\",vInfo[vid][jComp4]); INI_Int(\"Comp5\",vInfo[vid][jComp5]); INI_Int(\"Comp6\",vInfo[vid][jComp6]); INI_Int(\"Comp7\",vInfo[vid][jComp7]); INI_Int(\"Comp8\",vInfo[vid][jComp8]); INI_Int(\"Comp9\",vInfo[vid][jComp9]); INI_Int(\"Comp10\",vInfo[vid][jComp10]); INI_String(\"TulajNeve\", vInfo[vid][jTulajNeve]); INI_Float(\"FutottKM\", vInfo[vid][jFutottKM]); new id = kocsi; vInfo[id][jVan] = true; SetVehicleInterior(id, vInfo[vid][jInt]); SetVehicleVirtualWorld(id, vInfo[vid][jVW]); if(vInfo[id][jComp1] != 0) AddVehicleComponent(id,vInfo[id][jComp1]); if(vInfo[id][jComp2] != 0) AddVehicleComponent(id,vInfo[id][jComp2]); if(vInfo[id][jComp3] != 0) AddVehicleComponent(id,vInfo[id][jComp3]); if(vInfo[id][jComp4] != 0) AddVehicleComponent(id,vInfo[id][jComp4]); if(vInfo[id][jComp5] != 0) AddVehicleComponent(id,vInfo[id][jComp5]); if(vInfo[id][jComp6] != 0) AddVehicleComponent(id,vInfo[id][jComp6]); if(vInfo[id][jComp7] != 0) AddVehicleComponent(id,vInfo[id][jComp7]); if(vInfo[id][jComp8] != 0) AddVehicleComponent(id,vInfo[id][jComp8]); if(vInfo[id][jComp9] != 0) AddVehicleComponent(id,vInfo[id][jComp9]); if(vInfo[id][jComp10] != 0) AddVehicleComponent(id,vInfo[id][jComp10]); BCRP_ChangeVehicleColor(id,vInfo[id][jColor1],vInfo[id][jColor2]); BCRP_ChangeVehiclePaintJob(id,vInfo[id][jPaintJob]); SaveVehicle(id); printf(\"Kocsi %d betöltve\",id); return 1;}
.bPassTag = true
for(new i=1; i<MAX_VEHICLES;i++) { new vFile[32];
public LoadVehicle(vid, name[], value[]){ new vFile[32]; format(vFile, sizeof(vFile),\"/BCRP/Kocsik/%d.ini\",vid);
new kocsi = AddStaticVehicleEx
new id = kocsi;
if(vInfo[id][jComp1] != 0) AddVehicleComponent(id,vInfo[id][jComp1]); if(vInfo[id][jComp2] != 0) AddVehicleComponent(id,vInfo[id][jComp2]); if(vInfo[id][jComp3] != 0) AddVehicleComponent(id,vInfo[id][jComp3]); if(vInfo[id][jComp4] != 0) AddVehicleComponent(id,vInfo[id][jComp4]); if(vInfo[id][jComp5] != 0) AddVehicleComponent(id,vInfo[id][jComp5]); if(vInfo[id][jComp6] != 0) AddVehicleComponent(id,vInfo[id][jComp6]); if(vInfo[id][jComp7] != 0) AddVehicleComponent(id,vInfo[id][jComp7]); if(vInfo[id][jComp8] != 0) AddVehicleComponent(id,vInfo[id][jComp8]); if(vInfo[id][jComp9] != 0) AddVehicleComponent(id,vInfo[id][jComp9]); if(vInfo[id][jComp10] != 0) AddVehicleComponent(id,vInfo[id][jComp10]); BCRP_ChangeVehicleColor(id,vInfo[id][jColor1],vInfo[id][jColor2]); BCRP_ChangeVehiclePaintJob(id,vInfo[id][jPaintJob]);
SaveVehicle(id);
printf(\"Kocsi %d betöltve\",id);