Must-read
About Files
Relative path
All path related apis use a relative path: plugins\Luagin
.
Configs location
The configs of Luagin are located in plugins\Luagin\configs
.
Language location
The language configs of Luagin are located in plugins\Luagin\lang
.
Scripts location
The Luagin scripts are located in plugins\Luagin\scripts
.
Script configs location
You can create a folder under plugins\Luagin
, and then put the script configs in the folder.
Scripts environment
Each script runs in its own independent environment, which means that they cannot share global variables. But inter script function calls can be made through the comm
namespace.
Code styles support
It means you can do:
events.player:set("PlayerJoinEvent", function(e)
local name1 = e.player:get_name()
local name2 = e.player:getName()
local name3 = e:get_player():get_name()
local name4 = e:getPlayer():getName()
local name5 = e.player.name
end)
They all work, but it is recommended that you use only one style of code.
Last updated