Advertisement
Guest User

Untitled

a guest
May 6th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. public LoadCar()
  2. {
  3. new file[26];
  4. for(new idx = 1; idx < sizeof(CarInfo) ; idx++)
  5. {
  6. format(file, sizeof(file),"NooBotRP/Vehicles/%d.ini", idx)
  7. if(dini_Exists(file))
  8. {
  9. CarInfo[idx][cModel] = dini_Int(file,"Model");
  10. CarInfo[idx][cLocationx] = dini_Float(file,"Location_X");
  11. CarInfo[idx][cLocationy] = dini_Float(file,"Location_Y");
  12. CarInfo[idx][cLocationz] = dini_Float(file,"Location_Z");
  13. CarInfo[idx][cAngle] = dini_Float(file,"Angle");
  14. CarInfo[idx][cColorOne] = dini_Int(file,"Color_1");
  15. CarInfo[idx][cColorTwo] = dini_Int(file,"Color_2");
  16. strmid(CarInfo[idx][cOwner], dini_Get(file,"Owner"), 0, strlen(dini_Get(file,"Owner")), 255);
  17. CarInfo[idx][cOwned] = dini_Int(file,"Owned");
  18. CarInfo[idx][cLock] = dini_Int(file,"Locked");
  19. CarInfo[idx][cPaintjob] = dini_Int(file,"Paintjob");
  20. CarInfo[idx][cVirWorld] = dini_Int(file,"VirtualWorld");
  21. CarInfo[idx][cComponent0] = dini_Int(file,"Component0");
  22. CarInfo[idx][cComponent1] = dini_Int(file,"Component1");
  23. CarInfo[idx][cComponent2] = dini_Int(file,"Component2");
  24. CarInfo[idx][cComponent3] = dini_Int(file,"Component3");
  25. CarInfo[idx][cComponent4] = dini_Int(file,"Component4");
  26. CarInfo[idx][cComponent5] = dini_Int(file,"Component5");
  27. CarInfo[idx][cComponent6] = dini_Int(file,"Component6");
  28. CarInfo[idx][cComponent7] = dini_Int(file,"Component7");
  29. CarInfo[idx][cComponent8] = dini_Int(file,"Component8");
  30. CarInfo[idx][cComponent9] = dini_Int(file,"Component9");
  31. CarInfo[idx][cComponent10] = dini_Int(file,"Component10");
  32. CarInfo[idx][cComponent11] = dini_Int(file,"Component11");
  33. CarInfo[idx][cComponent12] = dini_Int(file,"Component12");
  34. CarInfo[idx][cComponent13] = dini_Int(file,"Component13");
  35. CarInfo[idx][cCode] = dini_Int(file,"SecurityCode");
  36. CarInfo[idx][cReg] = dini_Int(file,"Registracija");
  37. new reg = CarInfo[idx][cReg] = dini_Int(file,"Registracija");
  38. SetVehicleNumberPlate(idx, reg);
  39. }
  40. }
  41. print("[SCRIPT]: Loaded Cars");
  42. return 1;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement