Szerző Téma: Nem tölti be jól az autókat  (Megtekintve 627 alkalommal)

Nem tölti be jól az autókat
« Dátum: 2012. Október 28. - 12:35:36 »
0 Show voters
public OnGameModeInit()
{
printf(\"Privát jármûvek betöltése...\");
for(new v = 1; v < AUTO; v++)
{
      LoadCar(v);
}
printf(\"Privát jármûvek betöltve!\\n\");
printf(\"Jármûvek betöltése...\");
AddStaticVehicleEx(579,-261.82324219,1210.40722656,20.35000038,270.00000000,1,1,-1); //kocsi-------------ID:AUTO+1

 

public LoadCar(vehicleid)
{
new file[128];
format(file,sizeof(file),\"/Autok/%d.ini\",vehicleid);
if(!fexist(file))
{
    dini_Create(file);
    dini_IntSet(file, \"Tulajdonos\", 0);
    dini_IntSet(file, \"Motor\", 0);
dini_IntSet(file, \"Lampa\", 0);
dini_IntSet(file, \"Riaszto\", 0);
       dini_IntSet(file, \"Ajto\", 0);
dini_IntSet(file, \"Motorhazteto\", 0);
dini_IntSet(file, \"Csomagtarto\", 0);
dini_IntSet(file, \"Objective\", 0);
       dini_IntSet(file, \"Tipus\", 0);
       dini_IntSet(file, \"Benzin\", 0);
       dini_FloatSet(file, \"Allapot\", 0);
       dini_IntSet(file, \"Ar\", 0);
       dini_IntSet(file, \"Szin1\", 0);
       dini_IntSet(file, \"Szin2\", 0);
       dini_FloatSet(file, \"PosX\", 0);
       dini_FloatSet(file, \"PosY\", 0);
       dini_FloatSet(file, \"PosZ\", 0);
       dini_FloatSet(file, \"PosA\", 0);
         printf(\"%d számú kocsi létrehozva!\", vehicleid);
}
else
{
    CarInfo[vehicleid][Tulajdonos] = dini_Int(file, \"Tulajdonos\");
    CarInfo[vehicleid][Motor] = 0;
    CarInfo[vehicleid][Lampa] = 0;
    CarInfo[vehicleid][Riaszto] = dini_Int(file, \"Riaszto\");
        CarInfo[vehicleid][Ajto] = dini_Int(file, \"Ajto\");
        CarInfo[vehicleid][Motorhazteto] = dini_Int(file, \"Motorhazteto\");
        CarInfo[vehicleid][Csomagtarto] = dini_Int(file, \"Csomagtarto\");
        CarInfo[vehicleid][Objective] = dini_Int(file, \"Objective\");
    CarInfo[vehicleid][Tipus] = dini_Int(file, \"Tipus\");
    CarInfo[vehicleid][benzin] = dini_Int(file, \"Benzin\");
    CarInfo[vehicleid][Allapot] = dini_Float(file, \"Allapot\");
    CarInfo[vehicleid][Ar] = dini_Int(file, \"Ar\");
    CarInfo[vehicleid][szin1] = dini_Int(file, \"Szin1\");
    CarInfo[vehicleid][szin2] = dini_Int(file, \"Szin2\");
    CarInfo[vehicleid][PosX] = dini_Float(file, \"PosX\");
    CarInfo[vehicleid][PosY] = dini_Float(file, \"PosY\");
    CarInfo[vehicleid][PosZ] = dini_Float(file, \"PosZ\");
    CarInfo[vehicleid][PosA] = dini_Float(file, \"PosA\");
    CreateVehicle(CarInfo[vehicleid][Tipus], CarInfo[vehicleid][PosX], CarInfo[vehicleid][PosY], CarInfo[vehicleid][PosZ], CarInfo[vehicleid][PosA], CarInfo[vehicleid][szin1], CarInfo[vehicleid][szin2], -1);
SetVehicleHealth(vehicleid, CarInfo[vehicleid][Allapot]);
SetVehicleParamsEx(vehicleid,CarInfo[vehicleid][Motor],CarInfo[vehicleid][Lampa],CarInfo[vehicleid][Riaszto],CarInfo[vehicleid][Ajto],CarInfo[vehicleid][Motorhazteto],CarInfo[vehicleid][Csomagtarto],CarInfo[vehicleid][Objective]);
        printf(\"%d számú kocsi betöltve!\", vehicleid);
}
return 1;
}

 
Az a gondom, hogy nem az autorendszer jármûveit tölti be az elsõ 499 helyre, hanem az AddstaticVehicleEx-ekkel kezdi... Hogy csináljam meg hogy az elsõ 499 id, az autórendszeré leygen?

Nem tölti be jól az autókat
« Válasz #1 Dátum: 2012. Október 28. - 17:07:37 »
0 Show voters
Az OnGameModeInit-nél töltõd be azokat a jármûveket is használj ott is AddStaticVehicleEx-et a CreateVehicle helyett.

Nem tölti be jól az autókat
« Válasz #2 Dátum: 2012. Október 28. - 22:58:59 »
0 Show voters
Átírtam, de igyis az 1-es ID-jû kocsi nem a autorendszeré, pedig minden fájlt betölt rendesen

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal