This should work. I hope I got you right.

Code:
var switch_player;


if(camera.tilt < 10 && camera.tilt > -10)
{
switch_player = 1;
}
else { switch_player = 0; }


player_movement.x = 8 * (key_w) * time_step;
player_movement.y = 6 * (key_a - key_d) * time_step;
player_movement.z = switch_player * player_movement.x * camera.tilt * 0.2 * time_step;