Centauro Posted July 12, 2015 Share Posted July 12, 2015 Hello today i have a question, and i hope that you can asnwer this my question is: i could pass arguments of a event, example the arguments of a "onClientWeaponFire" to a new event executed? i want pass the arguments of event "onClientWeaponFire" for a new function executed with other event anyone can help me please ? thx Link to comment
myonlake Posted July 15, 2015 Share Posted July 15, 2015 You can do it by passing in a variable number of arguments. addEventHandler( "onClientWeaponFire", root, function( ... ) triggerEvent( "eventName", source, ... ) end ) addEvent( "eventName", true ) addEventHandler( "eventName", root, function( ... ) local hitElement, posX, posY, posZ, normalX, normalY, normalZ, materialType, lighting, pieceHit = unpack( { ... } ) end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now