Cargado de coches
#1

Buenas, hice un sistema para crear vehнculos IG pero resulta que no carga los coches, los coches se guardan correctamente en la carpeta Autos, estбn numerados, 1 2 3 4 5.
Ahora la cosa es que no los carga, los coches no aparecen:
pawn Код:
stock CargarAutos()
{
    new BArch[22],i;
    print("Cargando autos...\n");
    while(i < MAX_CARS)
    {
        format(BArch,sizeof(BArch),"Autos/%d.ini",i);
        if(fexist(BArch))
        {
            INI_ParseFile(BArch,"CargarAuto_%s",.bExtra = true, .extra = i);
            printf("Coche modelo: %i",InformacionA[i][aModelo]);
            Iter_Add(aAutos, i);
            CreateVehicle(InformacionA[i][aModelo], InformacionA[i][aPosX], InformacionA[i][aPosY], InformacionA[i][aPosZ], InformacionA[i][aRotacion], InformacionA[i][aColor1], InformacionA[i][aColor2], InformacionA[i][aRespawn]);
        }
        i++;
    }
    return 1;
}
Reply
#2

CargarAuto usa tag?
Reply
#3

їTe refieres a que si el archivo tiene tag?, sн, es 'data'

EDIT: Solucionado, he habнa faltado crear el
pawn Код:
forward CargarAutos_data(vehicleid,name[],value[]);
public CargarAutos_data(vehicleid,name[],value[])
{
    INI_Int("Modelo",InformacionA[vehicleid][aModelo]);
    INI_Float("PosX",InformacionA[vehicleid][aPosX]);
    INI_Float("PosY",InformacionA[vehicleid][aPosY]);
    INI_Float("PosZ",InformacionA[vehicleid][aPosZ]);
    INI_Float("Rotacion",InformacionA[vehicleid][aRotacion]);
    INI_Int("Color1",InformacionA[vehicleid][aColor1]);
    INI_Int("Color2",InformacionA[vehicleid][aColor2]);
    INI_Int("Tiempo respawn",InformacionA[vehicleid][aRespawn]);
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)