Nem tölt be a kocsi itt vannak a betöltõcuccok save és betöltõ:
LoadVehiclePos(v) //betöltés
{
new arrCoords[12][32];
new strFromFile2[256];
printf(\"LoadVehiclePos(%d)\\r\\n\", v);
new Float:vx,Float:vy,Float:vz,Float:vangle,Float:health,color1,color2,vehicleid,jarmuid;
printf(\"%d ID autó beolvasása...\\r\\n\",v);
format(stringx, sizeof(stringx), \"autok/%d.txt\", v);
new File: vkfile2 = fopen(stringx, io_read);
fread(vkfile2, strFromFile2);
printf(\"%d ID autó beolvasása sikeres\\r\\n\",v);
split(strFromFile2, arrCoords, \',\');
jarmuid = strval(arrCoords[0]);
vx = floatstr(arrCoords[1]);
vy = floatstr(arrCoords[2]);
vz = floatstr(arrCoords[3]);
vangle = floatstr(arrCoords[4]);
health = floatstr(arrCoords[5]);
color1 = strval(arrCoords[6]);
color2 = strval(arrCoords[7]);
kocsikulcsk[jarmuid] = strval(arrCoords[8]);
vehicleid = strval(arrCoords[9]);
szalonkeladva[v] = strval(arrCoords[10]);
strmid(rendszam[jarmuid], arrCoords[11], 0, strlen(arrCoords[11]), 255);
kocsiszink[jarmuid] = color1;
kocsiszin2k[jarmuid] = color2;
new a = AddStaticVehicleEx(vehicleid, vx,vy,vz,vangle,color1,color2,600);
SetVehicleHealth(a, health);
//SetVehicleNumberPlate(a, rendszam[jarmuid]);
fclose(vkfile2);
return 1;
}
public SaveVehiclePos(vehicleid, jarmuid, color1, color2, eladva) //elmentés
{
new vkstringx[256];
printf(\"SaveVehiclePos(%d,%d,%d,%d,%d)\\r\\n\", vehicleid,jarmuid,color1,color2,eladva);
new Float:vx,Float:vy,Float:vz,Float:vangle,Float:health;
new File: vkfile;
GetVehiclePos(jarmuid, vx,vy,vz);
GetVehicleZAngle(jarmuid, vangle);
GetVehicleHealth(jarmuid, health);
format(vkstringx, sizeof(vkstringx), \"%d,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%s\\n\", jarmuid,vx,vy,vz,vangle,health,color1,color2,kocsikulcsk[jarmuid],vehicleid,eladva,rendszam[jarmuid]);
format(stringx, sizeof(stringx), \"autok/%d.txt\", jarmuid);
vkfile = fopen(stringx, io_write);
fwrite(vkfile, vkstringx);
fclose(vkfile);
return 1;
}
stock SaveVehiclePos3(jarmuid,eladva) //elmentés
{
new vkstringx[256];
printf(\"SaveVehiclePos3(%d,%d)\\r\\n\", jarmuid,eladva);
new Float:vx,Float:vy,Float:vz,Float:vangle,Float:health;
new model = GetVehicleModel(jarmuid);
new File: vkfile;
GetVehiclePos(jarmuid, vx,vy,vz);
GetVehicleZAngle(jarmuid, vangle);
GetVehicleHealth(jarmuid, health);
format(vkstringx, sizeof(vkstringx), \"%d,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%s\\n\", jarmuid,vx,vy,vz,vangle,health,kocsiszink[jarmuid],kocsiszin2k[jarmuid],kocsikulcsk[jarmuid],model,eladva,rendszam[jarmuid]);
format(stringx, sizeof(stringx), \"autok/%d.txt\", jarmuid);
vkfile = fopen(stringx, io_write);
fwrite(vkfile, vkstringx);
fclose(vkfile);
return 1;
}
public SaveVehiclePos2(vehicleid, jarmuid, color1, color2, eladva, Float:x, Float:y, Float:z, Float:angle) //elmentés
{
printf(\"SaveVehiclePos2(%d,%d,%d,%d,%d,%f,%f,%f,%f)\\r\\n\", vehicleid,jarmuid,color1,color2,eladva,x,y,z,angle);
new vkstringx[256];
new File: vkfile;
format(vkstringx, sizeof(vkstringx), \"%d,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%s\\n\", jarmuid,x,y,z,angle,1000.000,color1,color2,kocsikulcsk[jarmuid],vehicleid,eladva,rendszam[jarmuid]);
format(stringx, sizeof(stringx), \"autok/%d.txt\", jarmuid);
vkfile = fopen(stringx, io_write);
fwrite(vkfile, vkstringx);
fclose(vkfile);
return 1;
}
És az adstaticvehicleexek se töltõdnek be :@