Ulysses
General => Off-Topic => Topic started by: iViscosity on March 06, 2017, 08:37:32 AM
-
Quick question, do you need to be in the ULib environment (lua/ulib/modules...) to use ULib functions/hooks? Such as ULibLocalPlayerReady and ULib.tsay(), etc. etc.
-
No, you can use it from anywhere as long as ULib has been loaded first.
If you're using code that runs as soon as the server starts, you might want to add checks to make sure ULib has loaded before trying to call it or you might get errors. That's why we suggest using the modules folder before it always gets loaded after ULib, but you can use the code anywhere.
-
Is there any way to setup a prioritization on which add-ons are loaded first? So that I can make sure mine loads afterwards?
-
Not really. But you could use some of the ULib callback hooks to load your code that requires ULib after ULib is initialized.
-
Ah. I also have another question: how are you able to make it so that it's able to be called from anywhere? I'd like to integrate an addon I'm working on with HandsomeMatt's Pointshop, so how would I go about doing that?