API
All exports and events that script provides for developers.
Example DoorObject
Exports
Client
openDoorsManagement
Open doors management UI with doors
Return:
: void
refreshBusinessBlips
Refreshes business blips on map, when parameter is nil, blips are wiped
Parameters:
businessName: string | nil
Return:
: void
getDoorsCreatedBy
Get all doors by creator (business / admin)
Parameters:
createdBy: string
Return:
doors: table<string, DoorObject>
openCrafting
Opens crafting for associated business (still restricted if player is not in correct business)
Parameters:
businessName: string
Return:
: void
openBossActions
Opens boss actions for associated business (still restricted if player is not in correct business and is not boss)
Parameters:
businessName: string
Return:
: void
getBusinessGrade
Get player's grade info in business and busienss name
Return:
grade: table<string, any> | nil
businessName: string | nil
hasPlayerBusinessPermision
Get if player has specific permission in his grade
Parameters:
permission: Business.Permissions (string)
Return:
result: boolean
startBusinessPreview
Starts business preview cinematic with camera
Return:
: void
changeDoorStateLocalNotPersist
Change door state locally on client, but won't persist. If anyone interact with doors, doors will be locked / unlocked depends on new state and local state will be overrided
Parameters:
doorId: string
state: number
-0
> unlocked,1
> locked
Return:
success: boolean
getObjectsByDoorId
Get objects assigned to door
Parameters:
doorId: string
Return:
objects: table<string, table>
Server
refreshBusinessBlips
Refreshes business blips on map for player
Parameters:
playerId: string
Return:
: void
getPlayerBusiness
Get player's business
Parameters:
playerId: string
Return:
businessName: string | nil
business: table<string, any> | nil
job: table<string, string | number> | nil
hasPlayerBusinessPermision
Get if player has specific permission in business
Parameters:
playerId: string
permission: Business.Permissions (string)
Return:
result: boolean
businessName: string | nil
business: table<string, any> | nil
job: table<string, string | number> | nil
addDoor
Add door into database and load it on every client
Parameters:
door: DoorObject
client: string | nil
- if used, Framework.isAdmin check will be runned
Return:
success: boolean
addObject
Add object into database and load it on every client
Parameters:
object: table
client: string | nil
- if used, Framework.isAdmin check will be runned
Return:
success: boolean
changeDoorState
Change door state, specified state persist and will be changed on all clients
Parameters:
doorId: string
state: number
-0
> unlocked,1
> locked
Return:
success: boolean
setPresetLoaded
Set preset loaded toggle into KVP
Parameters:
preset: string
loaded: boolean
Return:
: void
isPresetLoaded
Is preset loaded
Parameters:
preset: string
Return:
result: boolean
getSqlDoors
Get all doors synchronously from database (executes sql queries)
Return:
doors: table<string, DoorObject>
getSqlObjects
Get all objects synchronously from database (executes sql queries)
Return:
objects: table<string, table>
Shared
getBridgeInfo
Get informations about bridge
Return:
bridge: table<string, string | boolean
translate
Get locale translation
Parameters:
localeKey: string
,...: vararg<any>
Return:
locale: string
getBusinesses
Get all businesses from
config.business.lua
Return:
businesses: table<string, any>
getLoadedDoors
Get all loaded doors
Return:
doors: table<string, DoorObject>
getLoadedObjects
Get all loaded objects
Return:
objects: table<string, table>
Last updated