Are you positive the battery is dead? Have you tried to jump start it? That clicking could be the starter relay.
Causes include a weak battery, loose cables, failed starter.
Weak battery or starter motor shorted out internally.
Sounds like the battery went dead or you have loose/dirty battery connections.
Maybe Its Your Battery
check your battery then the connections if it still wont start try changing the starter solenoid if possible
dead battery or bad starter (with the clicking, I'm 95% sure its the battery)
Does the engine turn over and then make the clicking noise while trying to start, or does it not do anything but make the clicking noise when you turn the key. If its not turning over at all then it might be a battery problem, Try cleaning the battery terminals, and/or charge the battery, Could also be the starter solenoid, but start with the battery first.
Dead battery or dirty/loose battery connection.
The most common reason for your 1999 Ford Ranger pickup truck not to start is a battery that needs to be charged. Charge the battery for a minimum of 15 minutes.
Because you either have a dirty Battery cable or a lose battery cable connection or you may even have a battery that is nearly dead because of the other problems mentioned
charge the battery, change the battery, use the back up start either a pull start or kick start.
Low Battery