28.02.2019, 15:11
Hi!
When I use /checktrunk to see vehicle trunk it returns me empty slots, but there are not empty when loads vehicle data of the database.
Load Vehicle Function
Show Trunk Function
When I use /checktrunk to see vehicle trunk it returns me empty slots, but there are not empty when loads vehicle data of the database.
Load Vehicle Function
PHP код:
for (new i, j = cache_num_rows(); i != j; i++)
{
//InformacionV[i][ID] = cache_get_field_content_int(i, "ID", mysql);
InformacionV[i][Llave] = cache_get_field_content_int(i, "Llave", mysql);
InformacionV[i][Modelo] = cache_get_field_content_int(i, "Modelo", mysql);
//InformacionV[playerid][Matricula] = cache_get_field_content_string(0, "Matricuila", mysql);
InformacionV[i][Color1] = cache_get_field_content_int(i, "Color1", mysql);
InformacionV[i][Color2] = cache_get_field_content_int(i, "Color2", mysql);
//InformacionV[i][Propietario] = cache_get_field_content(i, "Propietario", mysql);
cache_get_row(i, 3, InformacionV[i][Propietario], mysql, 24);
InformacionV[i][Estado] = cache_get_field_content_float(i, "Estado", mysql);
InformacionV[i][vFaccion] = cache_get_field_content_int(i, "vFaccion", mysql);
InformacionV[i][Vehiculo_X] = cache_get_field_content_float(i, "Vehiculo_X", mysql);
InformacionV[i][Vehiculo_Y] = cache_get_field_content_float(i, "Vehiculo_Y", mysql);
InformacionV[i][Vehiculo_Z] = cache_get_field_content_float(i, "Vehiculo_Z", mysql);
InformacionV[i][Angulo] = cache_get_field_content_float(i, "Angulo", mysql);
InformacionV[i][estadoMaletero] = cache_get_field_content_int(i, "estadoMaletero", mysql);
InformacionV[i][Spawneado] = 0;
InformacionV[i][gSlot][0] = cache_get_field_content_int(0, "guanteraSlot_1", mysql);
InformacionV[i][gSlot][1] = cache_get_field_content_int(0, "guanteraSlot_2", mysql);
InformacionV[i][gSlotU][0] = cache_get_field_content_int(0, "guanteraSlotU_1", mysql);
InformacionV[i][gSlotU][1] = cache_get_field_content_int(0, "guanteraSlotU_2", mysql);
new string[50];
for(new s = 0; s < 20; s++)
{
format(string, sizeof(string), "maleteroSlot_%i", s+1);
InformacionV[i][mSlot][s] = cache_get_field_content_int(0, string, mysql);
format(string, sizeof(string), "maleteroSlotU_%i", s+1);
InformacionV[i][mSlotU][s] = cache_get_field_content_int(0, string, mysql);
printf("CargarVehiculo(%d): maleteroSlot_%i = %d — maleteroSlotU_%i = %d",
playerid,
s+1,
InformacionV[i][mSlot][s],
s+1,
InformacionV[i][mSlotU][s]);
}
PHP код:
stock VerMaletero(playerid, vehiculo)
{
new string[128], dialog[1028], header[50];
ActualizarManos(playerid);
printf("vehiculo id es igual a: %d", vehiculo);
for(new i = 0; i < 20; i++)
{
new maletero = InformacionV[vehiculo][mSlot][i];
printf("maletero_%i = %d", i, InformacionV[vehiculo][mSlot][i]);
if(maletero == 0) format(string, sizeof(string), "\n{b0b0b0}Slot vacнo");/*continue;*/
else format(string, sizeof(string), "\n%d. %s (%d usos)", i, NombreObjeto(maletero), InformacionV[vehiculo][mSlotU][i]);
strcat(dialog, string);
}
format(header, sizeof(header), "{D6E1EB}Maletero de %s", nombre_vehiculo[GetVehicleModel(vehiculo) - 400]);
ShowPlayerDialog(playerid, DIALOGO_MALETERO, DIALOG_STYLE_LIST, header, dialog, "Seleccionar", "Cancelar");
return 1;
}