Hello, my name is***** and I have over 20 years of experience as a veterinarian. I am very sorry to hear that your fellow seems so uncomfortable.
If he is bearing some weight on his leg a fracture is unlikely.
Leg injuries can be secondary to trauma (being hit by a car, falling from a high place and landing poorly or even a bite wound). There aren't any effective, safe pain medications for cats available over the counter. Ibuprofen and acetaminophen are toxic for cats and aspirin is poorly metabolized as well as not working very well at controlling pain. I don't recommend using any of them in cats.
If there is no external signs of trauma being hit by a car seems less likely.
The most common cause of limping in a young cat that goes outdoors or has housemates is a puncture bite or scratch wound from a fight with another cat or wild animal. These can be very difficult to find as the initial wound(s) may be very tiny on the surface, the trauma to the tissue is primarily under the skin. Many of these puncture wounds, especially bite or scratch puncture wounds from other cats do become infected and abscesses do develop. There isn't much for you to do at home for him as only systemic antibiotics will prevent that.
This isn't an emergency today if he is bearing any weight on his leg and there aren't any obvious wounds. I would recommend that you keep him inside and confined tonight and tomorrow at least. The less he does on that leg the better, ideally no running, jumping or climbing (including no stairs). He should be confined to a small room with water, food and his litter box.
If he isn't much better tomorrow you may want to have his veterinarian examine him to look for the cause of his limping.
Give him a little time to settle down and if he will let you examine him closely for any signs of bite or puncture wounds on the affected leg, foot and hip area. If you find any sign of a bite scratch wound or swelling warm compress the area and clean the wound(s) well with a dilute solution of warm water and antibacterial hand soap. Then I recommend having him seen by his regular veterinarian in the morning.
Best of luck with your fellow, please let me know if you have any further questions.