[Ajuda] Com Cardealership
#6

Passe o fs para seu gm!

e coloque essa funзao:
PHP Code:
public LoadCar()
{
    new 
arrCoords[13][64];
    new 
strFromFile2[256];
    new 
Filefile fopen("[FS]CarOwnership.cfg"io_read);
    if (
file)
    {
        new 
idx 0;
        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;

depois de todos carros na public ongamemodeinit
Reply


Messages In This Thread
[Ajuda] Com Cardealership - by Felipe_Freeze - 23.03.2012, 19:44
Re: [Ajuda] Com Cardealership - by Kon_BR - 23.03.2012, 19:48
Re: [Ajuda] Com Cardealership - by Felipe_Freeze - 23.03.2012, 20:04
Re: [Ajuda] Com Cardealership - by Kon_BR - 23.03.2012, 20:11
Re: [Ajuda] Com Cardealership - by Felipe_Freeze - 23.03.2012, 20:20
Re: [Ajuda] Com Cardealership - by Hiuship - 23.03.2012, 20:24
Re: [Ajuda] Com Cardealership - by Kon_BR - 23.03.2012, 20:27

Forum Jump:


Users browsing this thread: 2 Guest(s)