Author Topic: Mounting a light to a weapon?  (Read 827 times)

I'm trying to make a flashlight, and I know this is possible. I want the playerlight to turn on upon equipping the weapon, and to turn off upon un-equipping it.

Help will be much appreciated.


Check if %client.light exists when mounting, servercmdLight if it doesn't, %client.light.setDatablock(whateverFxLightDataHere);

Disable the use of servercmdlight when it is in your hand except when you are just using it or putting it away. (So you can't turn it off without putting the torch away)

Do servercmdLight again when you put it away.

This won't make a directional light, though, which would look better.

Post in a segment of code, please..?

You're starving. He just gave you a warm plate with about 8 beef burgers on it. You asked for knives and forks. Shame on you.

Post in a segment of code, please..?
He explained how do it.  If your asking someone to give you code, it goes in suggestions and requests.