mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
6
init.lua
6
init.lua
@@ -4,7 +4,7 @@
|
|||||||
---LGPL-3.0-or-later <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
---LGPL-3.0-or-later <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
||||||
|
|
||||||
if not _VERSION:find('5.4') then
|
if not _VERSION:find('5.4') then
|
||||||
error('^1Lua 5.4 must be enabled in the resource manifest!^0', 2)
|
error('Lua 5.4 must be enabled in the resource manifest!', 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
local resourceName = GetCurrentResourceName()
|
local resourceName = GetCurrentResourceName()
|
||||||
@@ -13,6 +13,10 @@ local ox_lib = 'ox_lib'
|
|||||||
-- Some people have decided to load this file as part of ox_lib's fxmanifest?
|
-- Some people have decided to load this file as part of ox_lib's fxmanifest?
|
||||||
if resourceName == ox_lib then return end
|
if resourceName == ox_lib then return end
|
||||||
|
|
||||||
|
if lib and lib.name == ox_lib then
|
||||||
|
error(("Cannot load ox_lib more than once.\n\tRemove any duplicate entries from '@%s/fxmanifest.lua'"):format(resourceName))
|
||||||
|
end
|
||||||
|
|
||||||
local export = exports[ox_lib]
|
local export = exports[ox_lib]
|
||||||
|
|
||||||
if GetResourceState(ox_lib) ~= 'started' then
|
if GetResourceState(ox_lib) ~= 'started' then
|
||||||
|
|||||||
Reference in New Issue
Block a user