Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*----------------------*/
- /* Chargement des véhicules */
- Chargement_Vehicules()
- {
- new rows, stringtext[128], count, Cache:result;
- result = mysql_query(mysql, "SELECT * FROM "MYSQL_VEHICLES_TABLE"");
- if(cache_get_row_count(rows))
- {
- for(new i = 1; i < rows; i++)
- {
- cache_get_value_int(i, "sqlid", vInfo[i][vSQL]);
- cache_get_value_float(i, "x", vInfo[i][vPosX]);
- cache_get_value_float(i, "y", vInfo[i][vPosY]);
- cache_get_value_float(i, "z", vInfo[i][vPosZ]);
- cache_get_value_float(i, "a", vInfo[i][vPosA]);
- cache_get_value_int(i, "color1", vInfo[i][vColor1]);
- cache_get_value_int(i, "color2", vInfo[i][vColor2]);
- cache_get_value_int(i, "model", vInfo[i][vModel]);
- cache_get_value(i, "immatriculation", vInfo[i][vPlaque], 7);
- vInfo[i][vID] = AddStaticVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2]);
- new stringplaque[7];
- format(stringplaque, sizeof(stringplaque), "%s", vInfo[i][vPlaque]);
- SetVehicleNumberPlate(i, stringplaque);
- SetVehicleToRespawn(i);
- ////
- new Text3D:vehicle3dtext[MAX_VEHICLES];
- vehicle3dtext[vInfo[i][vID]] = Create3DTextLabel("test", -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
- new string5[256];
- format(string5, sizeof string5, "%s", vInfo[i][vPlaque]);
- Update3DTextLabelText(vehicle3dtext[vInfo[i][vID]], -1, string5);
- Attach3DTextLabelToVehicle(vehicle3dtext[vInfo[i][vID]], vInfo[i][vID], -0.7, -1.9, -0.3);
- vInfo[i][vExist] = true;
- count++;
- }
- printf("[SQL_LOAD] CHARGEMENT DES VEHICULES EFFECTUER! (%i)", count);
- }
- else
- {
- print("[SQL_LOAD] /!/ CHARGEMENT DES VEHICULES FAILED!");
- }
- cache_delete(result);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement