You need a base resistor to limit the current to a suitable level. The base current needs to be about 300mA, use ohms law to calaculate the base resistor value.
hmmm, I think the collector current will be about 3/24 = 125 mA. Typical transistor with saturated gain of about 10 means base current should be around 12.5 mA. If the "base voltage" is 24V, then the base resistor would be about 2K ohms. That 2K resistor would be 1W unless the duty cycle is very low. I would also include a resistor from base to emitter, perhaps 1K 1/4 watt.