19.02.2017, 16:11
PHP код:
forward OnLoadRepairPickups();
public (OnLoadRepairPickups)
{
new count, totalpickups;
/* Compruebas que existen datos en el resultado. */
if(cache_get_row_count(count))
{
/* Recorres cada fila cargando sus propios datos. */
for(new x = 0; x < count; x++)
{
i = cache_get_value_name_int(i, "PickupID", ARepairPickups[i][PickupID]);
cache_get_value_name_float(x, "pux", ARepairPickups[i][pux]);
cache_get_value_name_float(x, "puy", ARepairPickups[i][puy]);
cache_get_value_name_float(x, "puz", ARepairPickups[i][puz]);
totalpickups++;
// Create pickups here
}
printf("Loaded: %d", totalpickups);
}
return 1;
}