Advertisement
Guest User

Untitled

a guest
May 6th, 2014
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.97 KB | None | 0 0
  1. // code
  2. new File:file = fopen("cars.cfg", io_read);
  3. if (file)
  4. {
  5.     new vehicleid = GetPlayerVehicleID(playerid);
  6.     ChangeVehicleColor(vehicleid, 0, 1);
  7.     CarInfo[vehicleid][cColorOne] = 0;
  8.         fclose(file);
  9.     OnPropUpdate();
  10. }
  11.  
  12. // OnPropUpdate
  13. new idx;
  14. new File: file2;
  15. new File: file = fopen("cars.cfg", io_read);
  16. idx=0;
  17. if (file)
  18. {
  19.     new strFromFile2[128];
  20.     while(fread(file, strFromFile2))
  21.     {
  22.            
  23.                 idx++;
  24.             new coordsstring[256];
  25.             format(coordsstring, sizeof(coordsstring), "%d,%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%s,%d,%d\n",
  26.             CarInfo[idx][cID],//
  27.             CarInfo[idx][cModel],//
  28.             CarInfo[idx][cLocationx],//
  29.             CarInfo[idx][cLocationy],//
  30.             CarInfo[idx][cLocationz],//
  31.             CarInfo[idx][cAngle],//
  32.             CarInfo[idx][cColorOne],//
  33.             CarInfo[idx][cColorTwo],//
  34.             CarInfo[idx][cOwner],//
  35.             CarInfo[idx][cDescription],//
  36.             CarInfo[idx][cValue],//
  37.             CarInfo[idx][cLicense],//
  38.             CarInfo[idx][cOwned],//
  39.             CarInfo[idx][cLock]);
  40.     }
  41.     fclose(file);
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement