Advertisement
Guest User

Untitled

a guest
Nov 29th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. public LoadCar(playerid)
  2. {
  3. new query[256],string[20];
  4. for(new idd; idd < PlayerInfo[playerid][pCarSlots]; idd++)
  5. {
  6. format(query, sizeof(query), "SELECT * FROM `cars` WHERE `ID`='%d'", PlayerInfo[playerid][pCar][idd]);
  7. new Cache: result = mysql_query(SQL, query);
  8. if(cache_get_row_count() > 0)
  9. {
  10. PlayerInfo[playerid][pCarModel][idd] = cache_get_field_content_int(0, "Model");
  11. PlayerInfo[playerid][pCarLocX][idd] = cache_get_field_content_float(0, "Locationx");
  12. PlayerInfo[playerid][pCarLocY][idd] = cache_get_field_content_float(0, "Locationy");
  13. PlayerInfo[playerid][pCarLocZ][idd] = cache_get_field_content_float(0, "Locationz");
  14. PlayerInfo[playerid][pCarAngle][idd] = cache_get_field_content_float(0, "Angle");
  15. PlayerInfo[playerid][pCarColor1][idd] = cache_get_field_content_int(0, "ColorOne");
  16. PlayerInfo[playerid][pCarColor2][idd] = cache_get_field_content_int(0, "ColorTwo");
  17. PlayerInfo[playerid][pCarLock][idd] = cache_get_field_content_int(0, "Lockk");
  18. PlayerInfo[playerid][pCarInsPrice][idd] = cache_get_field_content_int(0, "Inscarprice");
  19. PlayerInfo[playerid][pCarIns][idd] = cache_get_field_content_int(0, "Insurancecar");
  20. PlayerInfo[playerid][pCarKM][idd] = cache_get_field_content_float(0, "KM");
  21. PlayerInfo[playerid][pCarKMLast][idd] = cache_get_field_content_int(0, "LastKM");
  22. PlayerInfo[playerid][pCarHP][idd] = cache_get_field_content_float(0, "HP");
  23. PlayerInfo[playerid][pCarDamage1][idd] = cache_get_field_content_int(0, "Damage1");
  24. PlayerInfo[playerid][pCarDamage2][idd] = cache_get_field_content_int(0, "Damage2");
  25. PlayerInfo[playerid][pCarDamage3][idd] = cache_get_field_content_int(0, "Damage3");
  26. PlayerInfo[playerid][pCarDamage4][idd] = cache_get_field_content_int(0, "Damage4");
  27. PlayerInfo[playerid][pCarGas][idd] = cache_get_field_content_int(0, "Gas");
  28. PlayerInfo[playerid][pCarDays][idd] = cache_get_field_content_int(0, "days");
  29. PlayerInfo[playerid][pCarPaintJ][idd] = cache_get_field_content_int(0, "PaintJ");
  30. PlayerInfo[playerid][pNeon][idd] = cache_get_field_content_int(0, "Neon");
  31. PlayerInfo[playerid][pUpgrade][idd] = cache_get_field_content_int(0, "Upgrade");
  32. cache_get_field_content(0, "Vip", carvip[playerid][idd], SQL, 30);
  33. cache_get_field_content(0, "License", CarPlate[playerid][idd], SQL, 30);
  34. cache_get_field_content(0, "Owner", CarOwner[playerid][idd], SQL, 50);
  35. for(new s=1; s <= 17; s++)
  36. {
  37. format(string,sizeof(string),"mod%d",s);
  38. new ids = s-1;
  39. CarMod[playerid][idd][ids] = cache_get_field_content_int(0, string);
  40. }
  41. }
  42. cache_delete(result);
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement