Advertisement
Guest User

Untitled

a guest
Feb 13th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. public LoadCar(playerid)
  2. {
  3. for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
  4. {
  5. PlayerInfo[playerid][pCarModel][idd] = 0;
  6. PlayerInfo[playerid][pCarLocX][idd] = 0.0;
  7. PlayerInfo[playerid][pCarLocY][idd] = 0.0;
  8. PlayerInfo[playerid][pCarLocZ][idd] = 0.0;
  9. PlayerInfo[playerid][pCarAngle][idd] = 0.0;
  10. PlayerInfo[playerid][pCarLLocX][idd] = 0.0;
  11. PlayerInfo[playerid][pCarLLocY][idd] = 0.0;
  12. PlayerInfo[playerid][pCarLLocZ][idd] = 0.0;
  13. PlayerInfo[playerid][pCarAngle2][idd] = 0.0;
  14. PlayerInfo[playerid][pCarBuyTime][idd] = 0;
  15. PlayerInfo[playerid][pCarColor1][idd] = 1;
  16. PlayerInfo[playerid][pCarColor2][idd] = 1;
  17. PlayerInfo[playerid][pCarLock][idd] = 0;
  18. PlayerInfo[playerid][pCarInsPrice][idd] = 0;
  19. PlayerInfo[playerid][pCarIns][idd] = 0;
  20. PlayerInfo[playerid][pCarKM][idd] = 0.0;
  21. PlayerInfo[playerid][pCarKMLast][idd] = 0;
  22. PlayerInfo[playerid][pCarVIP][idd] = 0;
  23. PlayerInfo[playerid][pCarVipColors][idd] = 0;
  24. PlayerInfo[playerid][pCarHP][idd] = 0.0;
  25. PlayerInfo[playerid][pCarDamage1][idd] = 0;
  26. PlayerInfo[playerid][pCarDamage2][idd] = 0;
  27. PlayerInfo[playerid][pCarDamage3][idd] = 0;
  28. PlayerInfo[playerid][pCarDamage4][idd] = 0;
  29. PlayerInfo[playerid][pCarGas][idd] = 100;
  30. PlayerInfo[playerid][pCarPaintJ][idd] = 6;
  31. PlayerInfo[playerid][pCarBlock][idd] = 0;
  32. CarVipName[playerid][idd] = "";
  33. CarPlate[playerid][idd] = "";
  34. CarOwner[playerid][idd] = "";
  35. for(new s; s < 17; s++)
  36. {
  37. CarMod[playerid][idd][s] = 0;
  38. }
  39. }
  40. new query[256],string[20];
  41. for(new idd; idd < MAX_PERSONAL_VEHICLES; idd++)
  42. {
  43. format(query, sizeof(query), "SELECT * FROM `cars` WHERE `ID`='%d'", PlayerInfo[playerid][pCar][idd]);
  44. new Cache: result = mysql_query(SQL, query);
  45. if(cache_get_row_count() > 0)
  46. {
  47. PlayerInfo[playerid][pCarModel][idd] = cache_get_field_content_int(0, "Model");
  48. PlayerInfo[playerid][pCarLocX][idd] = cache_get_field_content_float(0, "Locationx");
  49. PlayerInfo[playerid][pCarLocY][idd] = cache_get_field_content_float(0, "Locationy");
  50. PlayerInfo[playerid][pCarLocZ][idd] = cache_get_field_content_float(0, "Locationz");
  51. PlayerInfo[playerid][pCarAngle][idd] = cache_get_field_content_float(0, "Angle");
  52. PlayerInfo[playerid][pCarLLocX][idd] = cache_get_field_content_float(0, "Locationx2");
  53. PlayerInfo[playerid][pCarLLocY][idd] = cache_get_field_content_float(0, "Locationy2");
  54. PlayerInfo[playerid][pCarLLocZ][idd] = cache_get_field_content_float(0, "Locationz2");
  55. PlayerInfo[playerid][pCarAngle2][idd] = cache_get_field_content_float(0, "Angle2");
  56. PlayerInfo[playerid][pCarBuyTime][idd] = cache_get_field_content_int(0, "BuyTime");
  57. PlayerInfo[playerid][pCarColor1][idd] = cache_get_field_content_int(0, "ColorOne");
  58. PlayerInfo[playerid][pCarColor2][idd] = cache_get_field_content_int(0, "ColorTwo");
  59. PlayerInfo[playerid][pCarLock][idd] = cache_get_field_content_int(0, "Lockk");
  60. PlayerInfo[playerid][pCarInsPrice][idd] = cache_get_field_content_int(0, "Inscarprice");
  61. PlayerInfo[playerid][pCarIns][idd] = cache_get_field_content_int(0, "Insurancecar");
  62. PlayerInfo[playerid][pCarKM][idd] = cache_get_field_content_float(0, "KM");
  63. PlayerInfo[playerid][pCarKMLast][idd] = cache_get_field_content_int(0, "LastKM");
  64. PlayerInfo[playerid][pCarVIP][idd] = cache_get_field_content_int(0, "VIP");
  65. PlayerInfo[playerid][pCarVipColors][idd] = cache_get_field_content_int(0, "VipColors");
  66. PlayerInfo[playerid][pCarHP][idd] = cache_get_field_content_float(0, "HP");
  67. PlayerInfo[playerid][pCarDamage1][idd] = cache_get_field_content_int(0, "Damage1");
  68. PlayerInfo[playerid][pCarDamage2][idd] = cache_get_field_content_int(0, "Damage2");
  69. PlayerInfo[playerid][pCarDamage3][idd] = cache_get_field_content_int(0, "Damage3");
  70. PlayerInfo[playerid][pCarDamage4][idd] = cache_get_field_content_int(0, "Damage4");
  71. PlayerInfo[playerid][pCarGas][idd] = cache_get_field_content_int(0, "Gas");
  72. PlayerInfo[playerid][pCarPaintJ][idd] = cache_get_field_content_int(0, "PaintJ");
  73. PlayerInfo[playerid][pCarBlock][idd] = cache_get_field_content_int(0, "Block");
  74. cache_get_field_content(0, "VipText", CarVipName[playerid][idd]);
  75. cache_get_field_content(0, "License", CarPlate[playerid][idd], SQL, 30);
  76. cache_get_field_content(0, "Owner", CarOwner[playerid][idd], SQL, 50);
  77. for(new s=1; s <= 17; s++)
  78. {
  79. format(string,sizeof(string),"mod%d",s);
  80. new ids = s-1;
  81. CarMod[playerid][idd][ids] = cache_get_field_content_int(0, string);
  82. }
  83. }
  84. cache_delete(result);
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement