Mr.Loki Posted July 30, 2015 Share Posted July 30, 2015 is there any way to trigger a function in a different file in the same script without using triggerClientEvent or triggerServerEvent I tried using this but i had no luck server function asdf() doStuff end addCommandHandler("cmd", asdf) client function doStuff() stuff end Link to comment
GTX Posted July 30, 2015 Share Posted July 30, 2015 What's wrong with triggerServerEvent and triggerClientEvent? No, there's no other way. Link to comment
Mr.Loki Posted July 30, 2015 Author Share Posted July 30, 2015 Thanks, just wanted to know if it was possible because i wanna keep my scripts as small as possible lolz Link to comment
Dealman Posted July 31, 2015 Share Posted July 31, 2015 Yes you can call functions from another file in the same resource so long as they're the same type. Client <-> Client. And to call a function you need the paranthesises: doStuff(). Link to comment
Mr.Loki Posted July 31, 2015 Author Share Posted July 31, 2015 Yes you can call functions from another file in the same resource so long as they're the same type. Client <-> Client.And to call a function you need the paranthesises: doStuff(). Thanks for that tip :D 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