Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoadCars(id)
- {
- new temp = cache_num_rows();
- if(temp == 0)
- {
- CarInfo[id][cID] = -2;
- }
- else
- {
- CarInfo[id][cID] = cache_get_field_content_int(0, "ID");
- CarInfo[id][cModel] = cache_get_field_content_int(0, "Model");
- CarInfo[id][cLocationx] = cache_get_field_content_float(0, "Locationx");
- CarInfo[id][cLocationy] = cache_get_field_content_float(0, "Locationy");
- CarInfo[id][cLocationz] = cache_get_field_content_float(0, "Locationz");
- CarInfo[id][cAngle] = cache_get_field_content_float(0, "Angle");
- CarInfo[id][cColorOne] = cache_get_field_content_int(0, "ColorOne");
- CarInfo[id][cColorTwo] = cache_get_field_content_int(0, "ColorTwo");
- cache_get_field_content(0, "Owner", CarInfo[id][cOwner], SQL, 129);
- CarInfo[id][cValue] = cache_get_field_content_int(0, "Value");
- cache_get_field_content(0, "License", CarInfo[id][cLicense], SQL, 129);
- CarInfo[id][cAlarm] = cache_get_field_content_int(0, "Alarm");
- CarInfo[id][cLock] = cache_get_field_content_int(0, "Lockk");
- CarInfo[id][mod0] = cache_get_field_content_int(0, "mod0");
- CarInfo[id][mod1] = cache_get_field_content_int(0, "mod1");
- CarInfo[id][mod2] = cache_get_field_content_int(0, "mod2");
- CarInfo[id][mod3] = cache_get_field_content_int(0, "mod3");
- CarInfo[id][mod4] = cache_get_field_content_int(0, "mod4");
- CarInfo[id][mod5] = cache_get_field_content_int(0, "mod5");
- CarInfo[id][mod6] = cache_get_field_content_int(0, "mod6");
- CarInfo[id][mod7] = cache_get_field_content_int(0, "mod7");
- CarInfo[id][mod8] = cache_get_field_content_int(0, "mod8");
- CarInfo[id][mod9] = cache_get_field_content_int(0, "mod9");
- CarInfo[id][mod10] = cache_get_field_content_int(0, "mod10");
- CarInfo[id][mod11] = cache_get_field_content_int(0, "mod11");
- CarInfo[id][mod12] = cache_get_field_content_int(0, "mod12");
- CarInfo[id][mod13] = cache_get_field_content_int(0, "mod13");
- CarInfo[id][paintjob] = cache_get_field_content_int(0, "paintjob");
- CarInfo[id][KM] = cache_get_field_content_float(0, "KM");
- CarInfo[id][Userid] = cache_get_field_content_int(0, "Userid");
- CarInfo[id][Confiscated] = cache_get_field_content_int(0, "Confiscated");
- //CarInfo[id][Spawned] = cache_get_field_content_int(0, "Spawned");
- CarInfo[id][cSpecial] = cache_get_field_content_int(0, "Special");
- }
- }
- function PreLoadCars()
- {
- new query[128];
- new x = cache_get_field_content_int(0, "MAX(ID)");
- pvehs = x;
- for(new i = 1; i <= x; i++)
- {
- mysql_format(SQL, query, sizeof(query), "SELECT * FROM `cars` WHERE ID = %d",i);
- mysql_tquery(SQL, query, "LoadCars", "i", i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement