There are many causes to this problem, in a 1999 Ford Ranger 3.0L. It is usually caused by a spark plug firing when its not suppose to, or late/delayed timing.
Timing or lack of fuel
The timing for the 1994 Ford Ranger XL with a 2.3-liter engine is set at 10 degrees BTDC (Before Top Dead Center) at idle. The firing order for this engine is 1-3-4-2. The spark plugs should be connected in that sequence, starting with cylinder 1, which is located at the front of the engine on the driver's side.
1 - 3 - 4 - 2
because you did it wrong
According to www.therangerstation.com , for the 2.8 L V6 engine : spark plug AWSF - 42 C spark plug gap .044 inch ignition timing 10 degrees BTDC firing order 1 - 4 - 2 - 5 - 3 - 6 distributor rotation CLOCKWISE
The spark plug firing order is ( 1 - 3 - 4 - 2 ) and the distributor rotor turns CLOCKWISE
From the front of the engine, the spark plugs are numbered 1-2-3-4. The firing order is 1-3-4-2. - Haynes Repair Manual #36071, 1993-2005 Ford Ranger Pickups.
the timing should be set top dead center with the number one spark plug
the ranger station . com ( no spaces ) Click on Technical Library
The firing order should be stamped onto the engine block at some location, or on the stickers at the front of the hood.
have u checked spark plug wires, ignition coils, timing,spark plugs or had it hooked to a reader?