No cargan las ids de los coches correctamente. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (
https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: No cargan las ids de los coches correctamente. (
/showthread.php?tid=587746)
No cargan las ids de los coches correctamente. -
Jose_grana - 02.09.2015
Estuve siguiendo este tutorial:
https://sampforum.blast.hk/showthread.php?tid=578782
Las ids las detecta bien ( por ejemplo solo tengo el coche ID 1 y el 4 )pero a la hora de entrar en el servidor siguen siendo IDS correlativas, es decir 1, 2, 3, 4.
Asн tengo en OnGameModeInit:
pawn Код:
for(new bLoop = 1; bLoop < sizeof(VehiculosInfo); bLoop++) //loop
{
new gFile[35]; //string
format(gFile, 50, VEHICLE_FOLDER ,bLoop); //formating string
if(fexist(gFile)) //checking does file exist witch is in format
{
INI_ParseFile(gFile, "CargarVehiculos", .bExtra = true, .extra = bLoop); //Y_INI function to load from vehicles
if(VehiculosInfo[bLoop][CarModel] == 0) //if model is everytning expect 0
{
printf("El coche %d no se creу", bLoop);//Esto no llega a salir nunca.
continue;
}
if(VehiculosInfo[bLoop][CarModel] != 0) //if model is everytning expect 0
{
VehiculosInfo[bLoop][CocheId] = CreateVehicle(VehiculosInfo[bLoop][CarModel], VehiculosInfo[bLoop][CarX],VehiculosInfo[bLoop][CarY],VehiculosInfo[bLoop][CarZ],VehiculosInfo[bLoop][CarAngle], VehiculosInfo[bLoop][CarColor1], VehiculosInfo[bLoop][CarColor2], 0); //creating vehicle
CuentaCoches++;
IDsCoches[bLoop] = bLoop;
}
}
}
ї Alguna idea ?.