Before reading:
This script works default best without a spawn selector!
Best with spawn at last location.
And only for servers which don’t have 200+ players since it only can hold as much as the MLO has rooms
Flex-appa is a new way to let people join your city!
When joining each player gets an apartment assigned.
Each player can then look up there apartment number.
If you want other friends to enter your apartment and stash then you will need to give them a copy of the key of your room (which gets removed after leave).
Only players who have a key can open the stash / enter the apartment (for bug abuse reasons)
What do you need?
- This script works with Inside Interactions or qb-target .
- Comes with qb-doorlock setup and has support for OX too.
- For the elevator, you will have to make that yourself (since i edited THIS (and can deliver it with the script) to trigger the spawning of the shells / MLO layers when going to a level).
- Default this works with THIS VON CRASTENBURG MLO
This script comes only fully open source so edit away you like!
GET IT HERE 15 euro + tax
SETUP
For QB-DOORLOCK add this to the server side
QBCore.Functions.CreateCallback(‘qb-doorlock:server:getDoorState’, function(source, cb, doorID)
cb(Config.DoorList[doorID].locked)
end)
To make it work with the GN VON HOTEL
You will need to add / edit your own elevator script
Will will need to trigger ‘flex-appa:unLoadAppa’ when you go to the lobby
And for each level you will need to trigger ‘flex-appa:loadEtage1’ (Change the 1 with every number you have)
For example for the apartment mlo i used:
- flex-appa:loadEtage1
- flex-appa:loadEtage2
- flex-appa:loadEtage3
- flex-appa:loadEtage4
- flex-appa:loadEtage5
- flex-appa:loadEtage6
- flex-appa:loadEtage7
The config for qb-doorlock (which you can convert to ox) is in the doorlock.md file
Setup to make it auto give an apartment is like this
-
First look for ‘QBCore:Server:OnPlayerLoaded’ or ‘QBCore:Client:OnPlayerLoaded’ in your multicharacter (the spot where it first triggeres one of these in the client side (like where it creates your first character))
-
Then add this TriggerEvent(‘flex-appa:client:NewState’) above it
If you’re selling your resource, please include the following information at the end of your post:
| Code is accessible | Yes all of it |
| Subscription-based | No |
| Lines (approximately) | 561 (client and server) + 893 (for the setup of each apartment) + 478 (for loading and unloading the mlo) |
| Requirements | qb-doorlock or ox / inside-interaction or qb-target |
| Support | Yes |
(For releases without code the not applicable fields can be written as N/A)
