-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframework.lua
More file actions
21 lines (20 loc) · 860 Bytes
/
Copy pathframework.lua
File metadata and controls
21 lines (20 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FrameworkName = nil
ESX = nil
QBCore = nil
-- Thanks to optional_dependencies, frameworks are already started if present
-- No need to wait or loop, we can detect directly
if GetResourceState('es_extended') == 'started' then
FrameworkName = 'es_extended'
ESX = exports['es_extended']:getSharedObject()
debugPrint('[character-manager] Using es_extended')
elseif GetResourceState('qb-core') == 'started' then
FrameworkName = 'qb-core'
QBCore = exports['qb-core']:GetCoreObject()
debugPrint('[character-manager] Using qb-core')
elseif GetResourceState('qbox_core') == 'started' then
FrameworkName = 'qbox_core'
QBCore = exports['qbox_core']:GetCoreObject()
debugPrint('[character-manager] Using qbox_core')
else
print('^1[character-manager] No framework detected. Please install es_extended, qb-core or qbox_core.^7')
end