To the noob:
# = float in DBPro
void Playercontrol( float Speed )
{
float a;
a = dbObjectAngleY(1);
float x,z;
x = dbObjectPositionX(1);
z = dbObjectPositionZ(1);
x = dbNewXValue( x , a , Speed );
z = dbNewZValue( z , a , Speed );
float h = dbGetTerrainGroundHeight( 1 , x , z );
dbPositionObject( 1 , x , h , z );
dbYRotateObject( 10 , a );
if( dbUpKey() && Speed < 1.2 ){Speed += 0.2;}
if( dbDownKey() && Speed > -1.2 ){Speed -= 0.2;} // Dunno WhyTF u want > -1.2 but it's ur code.
if( dbLeftKey() ){ a = dbWrapValue( a - 1 ); }
if( dbRightKey() ){ a = dbWrapValue( a + 1 ); }
}
Wrote it as it own method/function.
Keep it simple.
Questions? Mail me