30.08.2011, 12:09
(
Последний раз редактировалось Universal; 31.08.2011 в 09:43.
)
Hello everyone, today I met one problem, you can understand from the topic title...
So, look how the car is standing:
But it should be standing like this:
Now, I'll show you some code, which loads the vehicles from the database:
Well, any ideas? Don't really understand why the fu*k its not working...
Thanks for help, looking forward.
So, look how the car is standing:
But it should be standing like this:
Now, I'll show you some code, which loads the vehicles from the database:
pawn Код:
while( mysql_retrieve_row( ) )
{
mysql_get_field( "model", buffer );
new model = strval( buffer );
new vehid = CreateVehicle( model, 30.0, 40.0, 50.0, 60.0, 0, 0, 0 );
mysql_get_field( "a", buffer );
gVehData[ vehid ][ facingA ] = floatstr( buffer );
mysql_get_field( "x", buffer );
gVehData[ vehid ][ pos ][ 0 ] = floatstr( buffer );
mysql_get_field( "y", buffer );
gVehData[ vehid ][ pos ][ 1 ] = floatstr( buffer );
mysql_get_field( "z", buffer );
gVehData[ vehid ][ pos ][ 2 ] = floatstr( buffer );
mysql_get_field( "color1", buffer );
gVehData[ vehid ][ color ][ 0 ] = strval( buffer );
mysql_get_field( "color2", buffer );
gVehData[ vehid ][ color ][ 1 ] = strval( buffer );
mysql_get_field( "fuel", buffer );
gVehData[ vehid ][ fuel ] = strval( buffer );
mysql_get_field( "locked", buffer );
gVehData[ vehid ][ locked ] = strval( buffer );
mysql_get_field( "owner", buffer );
format( gVehData[ vehid ][ owner ], 25, "%s", buffer );
SetVehiclePos( vehid, gVehData[ vehid ][ pos ][ 0 ], gVehData[ vehid ][ pos ][ 1 ], gVehData[ vehid ][ pos ][ 2 ] );
SetVehicleZAngle( vehid, gVehData[ vehid ][ facingA ] );
SetVehicleParamsEx( vehid, 0, 0, 0, gVehData[ vehid ][ locked ], 0, 0, 0 );
ChangeVehicleColor( vehid, gVehData[ vehid ][ color ][ 0 ], gVehData[ vehid ][ color ][ 1 ] );
gVehData[ vehid ][ loaded ] = true;
printf( " >> Log: vehicle id %d which owner is %s has been loaded.", vehid, gVehData[ vehid ][ owner ] );
}
Thanks for help, looking forward.