Twilight Elevatorspaidv1.1.0Qbox
Installation & Config
Get Twilight Elevators running and add your own buildings.
Installation
Download the resource
Download twilight-elevators from your CFX Portal granted assets and place it in your resources folder.
Start it after its dependencies
Add it to your server.cfg below the resources it depends on.
ensure oxmysql
ensure ox_lib
ensure ox_target
ensure xsound
ensure qbx_core
ensure twilight-elevatorsGeneral Settings
All options live in config.lua.
| Option | Type | Default | Description |
|---|---|---|---|
| Config.Debug | boolean | false | Draws the target zones so you can line up panels. |
| Config.VersionCheck | boolean | true | Prints whether you are on the latest version at startup. |
| Config.CooldownMs | number | 2500 | Time in ms before a player can open a panel again. |
| Config.TravelTime | number | 2500 | Length of the travel progress bar in ms. |
| Config.UseSounds | boolean | true | Plays the arrival chime through xsound. |
| Config.UIPrimaryColor | string | '#6D28D9' | Accent colour of the floor selector. |
| Config.UITiltEnabled | boolean | true | Set to false for a flat panel. |
| Config.UITilt | number | 15 | How far the panel leans away from the screen. |
Admin Menu Settings
| Option | Type | Default | Description |
|---|---|---|---|
| Config.Admin.Command | string | 'elevatoradmin' | Command that opens the admin menu. |
| Config.Admin.Ace | string | 'twilight.elevators.admin' | Ace that grants access to the admin menu. |
| Config.Admin.Groups | string[] | { 'admin', 'god' } | Qbox groups that can use the admin menu. |
| Config.Admin.LogWebhook | string | '' | Discord webhook for a permanent log of admin changes. |
Adding an Elevator
You can build elevators in game with the admin menu, or add them to config.lua by hand. Each entry in Config.Elevators is one elevator. A panel is where players interact, and a floor is where they arrive.
Config.Elevators = {
["mission_row_main"] = {
label = "Mission Row Police Department",
groupId = "mrpd",
panels = {
{ coords = vec3(456.03, -988.37, 30.40), size = vec3(1.2, 1.2, 2.2), heading = 340.0 },
},
floors = {
{
id = "pd_main_floor",
label = "Main Floor",
order = 1,
coords = vec4(457.16, -989.52, 30.27, 89.50),
allowedJobs = { "police" },
},
},
},
}Floor Options
| Option | Type | Default | Description |
|---|---|---|---|
| id | string | required | Unique id for the floor. |
| label | string | required | Name shown in the floor selector. |
| order | number | required | Position of the floor in the selector. |
| coords | vec4 | required | Where the player arrives, including heading. |
| allowedJobs | string[] | nil | Jobs allowed to travel here. Leave out for public floors. |
Linked elevators
Give two elevators in the same building the same groupId and they will share the player's current floor, so either lift knows where they are.