Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // code
- new File:file = fopen("cars.cfg", io_read);
- if (file)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- ChangeVehicleColor(vehicleid, 0, 1);
- CarInfo[vehicleid][cColorOne] = 0;
- fclose(file);
- OnPropUpdate();
- }
- // OnPropUpdate
- new idx;
- new File: file2;
- new File: file = fopen("cars.cfg", io_read);
- idx=0;
- if (file)
- {
- new strFromFile2[128];
- while(fread(file, strFromFile2))
- {
- idx++;
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d,%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d,%d\n",
- CarInfo[idx][cID],//
- CarInfo[idx][cModel],//
- CarInfo[idx][cLocationx],//
- CarInfo[idx][cLocationy],//
- CarInfo[idx][cLocationz],//
- CarInfo[idx][cAngle],//
- CarInfo[idx][cColorOne],//
- CarInfo[idx][cColorTwo],//
- CarInfo[idx][cOwner],//
- CarInfo[idx][cDescription],//
- CarInfo[idx][cValue],//
- CarInfo[idx][cLicense],//
- CarInfo[idx][cOwned],//
- CarInfo[idx][cLock]);
- }
- fclose(file);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement