17.07.2013, 10:31
Hello so i have this:
Now this line doesnt work:
But the problem is _Carid is always zero while theres a 0 and a 1 in the database:
Uploaded with ImageShack.us
pawn Код:
forward OnPlayerHousesVehiclesLoad(playerid, houseid_);
public OnPlayerHousesVehiclesLoad(playerid, houseid_)
{
printf( "OnPlayerHousesVehiclesLoad::houseid_ = %d", houseid_ );
new rows, fields;
cache_get_data( rows, fields, Handle );
if( rows )
{
print("There are rows - Vehicles");
new
idx = 0,
cmodel2, Float: cx2, Float: cy2, Float: cz2, Float: crot2, ccol1, ccol2, _carid
;
while( rows > idx )
{
_carid = cache_get_row_int(idx, 2);
cmodel2 = cache_get_row_int( idx, 3 );
cx2 = cache_get_row_float( idx, 4 );
cy2 = cache_get_row_float( idx, 5 );
cz2 = cache_get_row_float( idx, 6 );
crot2 = cache_get_row_float( idx, 7 );
ccol1 = cache_get_row_int( idx, 8 );
ccol2 = cache_get_row_int( idx, 9 );
printf("House_AddVehicle(%d,%d,%f,%f,%f,%f,%d,%d, %d);", houseid_, cmodel2, cx2, cy2, cz2, crot2, ccol1, ccol2, _carid);
House_AddVehicle(houseid_, cmodel2, cx2, cy2, cz2, crot2, ccol1, ccol2, _carid);
print("Car loaded");
idx++;
}
}
return 1;
}
Код:
_carid = cache_get_row_int(idx, 2);
Uploaded with ImageShack.us