Last updated
Last updated
Applications load at the start-up. Files are automatically loaded depending on their prefix. (sv_, cl_, sh_)
You can put multiples files of the same realm/same prefix.
You don't need to put an app meta in every file. They will be loaded no matter their content.
You don't need to create your main panel, everything is given in the APP:Open meta.
Now that everything is good, let's create our first app! Mine will be a red-painted panel.
1. Create the folder
You need to create a folder/addon structure in :
addons/[Addon Name]/lua/aphone/apps
( Or you can register your app in your addon, you can do this later in the wiki )
2. Fill with files
I'm gonna create a file : "cl_mycooladdon.lua". The cl_ is needed to auto-include your file in the client realm.
Now you need to put this code in your file :
This code is the header of your file. Everything on top of it can't be an app meta/function.
Now, I'm gonna use the APP:Open meta so I can manipulate my panel
Now, my app is done, but there is something missing.
You need to put this at the end of your file :
This is needed to give your app to the loader. At this point, your app will appear and work
If you want to make more complicated apps, I invite you to check the next chapter that relates to every function you would need to make your app.