LARP Vehicles help.
#5

Mr Despair, that is there.
PHP код:
public LoadCar()
{
    new 
arrCoords[13][64];
    new 
strFromFile2[256];
    new 
Filefile fopen("cars.cfg"io_read);
    if (
file)
    {
        new 
idx 184;
        while (
idx sizeof(CarInfo))
        {
            
fread(filestrFromFile2);
            
split(strFromFile2arrCoords',');
            
CarInfo[idx][cModel] = strval(arrCoords[0]);
            
CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
            
CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
            
CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
            
CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
            
CarInfo[idx][cColorOne] = strval(arrCoords[5]);
            
CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
            
strmid(CarInfo[idx][cOwner], arrCoords[7], 0strlen(arrCoords[7]), 255);
            
strmid(CarInfo[idx][cDescription], arrCoords[8], 0strlen(arrCoords[8]), 255);
            
CarInfo[idx][cValue] = strval(arrCoords[9]);
            
CarInfo[idx][cLicense] = strval(arrCoords[10]);
            
CarInfo[idx][cOwned] = strval(arrCoords[11]);
            
CarInfo[idx][cLock] = strval(arrCoords[12]);
            
printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]);
            
idx++;
        }
    }
    return 
1;

^ Where it is loaded.

PHP код:
    for(new 184sizeof(CarInfo); h++)
    {
        
CreateVehicle(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
    } 
^ When vehicles are added, that is below.

I haven't changed anything since downloading, i would like to add. and the problem is on both windows and linux servers....
Reply


Messages In This Thread
LARP Vehicles help. - by bn102 - 04.01.2011, 00:56
Re: LARP Vehicles help. - by Krx17 - 04.01.2011, 00:59
Re: LARP Vehicles help. - by bn102 - 04.01.2011, 01:01
Re: LARP Vehicles help. - by Mr. Despair - 04.01.2011, 01:03
Re: LARP Vehicles help. - by bn102 - 04.01.2011, 01:07
Re: LARP Vehicles help. - by Krx17 - 04.01.2011, 01:10
Re: LARP Vehicles help. - by bn102 - 04.01.2011, 01:14

Forum Jump:


Users browsing this thread: 1 Guest(s)