🛗 Elevator UI [Standalone] (3€ ESCROW or 7€ OPEN-SOURCE)

PREVIEW

TEBEX (Escrow) - 3€ | Tebex (Open-Source) - 7€

Config.lua

:fr: Pour l’open-source, toute la partie ‘Config.Elevator Config’ et DrawText n’est pas mise. C’est seulement pour l’escrow

:us: For open-source, the whole ‘Config.Elevator Config’ and DrawText part is not included. It’s only for the escrow

Config.Elevator_Config = {
    ['Interaction'] = {
        ShowMarker = 10.0,
        MarkerOption = {Type = 6, dirX = 0.0, dirY = 0.0, dirZ = 0.0, rotX = -90.0, rotY = 0.0, rotZ = 0.0, scaleX = 0.7, scaleY = 0.7, scaleZ = 0.7, red = 255, green = 255, blue = 255, alpha = 100, bobUpAndDown = false, faceCamera = false, p19 = true, rotate = false, textureDict = false, textureName = false, drawOnEnts = false}, 
        MarkerZPosition = (-0.97), -- If you want to increase the height of the marker. Remove the “-”
        InteractMarker = 2.0,
        TextInteraction = "[E] Elevator",
        ElevatorInteractionKey = 38, -- https://docs.fivem.net/docs/game-references/controls/
    },
    ['Animation'] = { -- This animation is made in order to have quality in the TP
        SetFade = true, -- If you want the animation in black
        
        DoScreenFadeOut = 200, -- The fade black animation
        FirstWait = 250, -- Animation between fade and TP
        SecondWait = 750, -- The Wait after being TP
        DoScreenFadeIn = 200, -- End of black animation
    }
}

Config.Elevator = {
    -- If you need to have the same name on different elevators. Add a space after the sentence, example: "Elevator", "Elevator ", "Elevator  "
    ['Los Santos Police Department'] = {
        {
            FloorNumber = "-1",
            TpTo = vector4(-1096.0, -850.52, 4.88, 40.06),
        },
        {
            FloorNumber = "-2",
            TpTo = vector4(-1096.1, -850.7, 10.28, 38.63),
        },
        {
            FloorNumber = "-3",
            TpTo = vector4(-1095.91, -850.7, 13.69, 41.62),
        },
        {
            FloorNumber = "1",
            TpTo = vector4(-1095.98, -850.61, 19.0, 37.17),
        },
        {
            FloorNumber = "2",
            TpTo = vector4(-1096.02, -850.63, 23.04, 36.63),
        },
        {
            FloorNumber = "3",
            TpTo = vector4(-1096.11, -850.46, 26.83, 40.14),
        },
        {
            FloorNumber = "4",
            TpTo = vector4(-1096.02, -850.65, 30.76, 39.6),
        },
        {
            FloorNumber = "5",
            TpTo = vector4(-1096.27, -850.4, 34.36, 40.6),
        },
        {
            FloorNumber = "6",
            TpTo = vector4(-1096.23, -850.34, 38.24, 29.75),
        },      
    },

    ['Emergency Medical Services'] = {
        {
            FloorNumber = "-1",
            TpTo = vector4(-419.05, -344.87, 24.23, 110.16),
        },
        {
            FloorNumber = "0",
            TpTo = vector4(-436.09, -359.7, 34.95, 352.23),
        },
        {
            FloorNumber = "10",
            TpTo = vector4(-443.93, -332.24, 78.17, 357.22),
        },   
    },

    ['Emergency Medical Services '] = {
        {
            FloorNumber = "-4",
            TpTo = vector4(275.72, -1361.29, 24.54, 52.9),
        },   
        {
            FloorNumber = "-3",
            TpTo = vector4(-452.64, -288.41, -130.84, 115.72),
        },  
        {
            FloorNumber = "0",
            TpTo = vector4(-452.62, -288.42, 34.95, 116.03),
        },
        {
            FloorNumber = "4",
            TpTo = vector4(-490.59, -327.63, 69.5, 178.3),
        },
    },
}

Elevator_DrawText = function(x, y, z, text)
    local px,py,pz=table.unpack(GetGameplayCamCoords())
    local dist = GetDistanceBetweenCoords(px,py,pz, x,y,z, 1)
 
    local scale = (1/dist)*2
    local fov = (1/GetGameplayCamFov())*100
    local scale = scale*fov
        SetTextScale(0.0*scale, 0.40*scale)
        SetTextFont(4)
        SetTextProportional(1)
        SetTextColour(255, 255, 255, 215)
        SetTextDropshadow(0, 0, 0, 0, 255)
        SetTextEdge(1, 0, 0, 0, 150)
        SetTextDropShadow()
        SetTextOutline()
        SetTextEntry("STRING")
        SetTextCentre(1)
        AddTextComponentString(text)
        SetDrawOrigin(x,y,z, 0)
        DrawText(0.0, 0.0)
        ClearDrawOrigin()
end

:fr:
Voici mon script d’ascenseur. J’ai dĂ©jĂ  rĂ©alisĂ© une version trĂšs simple , mais cette fois-ci, c’est une version plus esthĂ©tique, plus poussĂ©e. Vous avez le choix entre la version semi-cryptĂ©e Ă  3 € et l’open-source qui coĂ»te 7 €. Je trouve que ces prix sont assez corrects et ne sont pas abusifs comme d’autres sur le marchĂ©.

:us:
Here is my elevator script. I have already created a very simple version, but this time, it’s a more aesthetic and advanced version. You have the choice between the semi-encrypted version for €3 and the open-source version that costs €7. I think these prices are quite reasonable and are not excessive compared to others in the market.

Code is accessible Yes & No
Subscription-based No
Lines (approximately) ~300
Framework Standalone
Translation in script EN & Custom
Support Yes

My scripts/mapping

:police_car: Police Menu Extra [ESX (QB in readme.md)] (FREE)
:ballot_box: VoteTopServeur [QB] (FREE)

:manual_wheelchair: Wheelchair [ESX & QB] (1€ ESCROW or 2€ OPEN-SOURCE)
:taxi: Taxi [ESX & QB] (2€ Open-Source)
:elevator: Elevator UI [Standalone] (3€ ESCROW or 7€ OPEN-SOURCE)
:bed: Stretcher [ESX & QB] (5€ ESCROW or 7€ Open-Source)
:file_folder: Police lockers and investigation files [ESX & QB] (5€ ESCROW or 10€ OPEN-SOURCE)
:pen: JobTattoo [ESX & QB] (15€ OPEN-SOURCE)
:iphone: LB Phone Plugin : App News
:file_cabinet:Lockers UI [ESX & QB] (7€ Escrow & 40€ Open-Source)

:racing_car: Karting YMAP [FREE]
:racing_car: Race YMAP Grapeseed [FREE]
:racing_car: Race YMAP Port of Los Santos [FREE]

This is tagged as free
 It isn’t. Love the concept and UI of it, looks clean.

Oh ! Indeed sorry, I put the tags at the same time as I put the github link of the free elevator :sweat_smile:

I don’t Understand why you have done this Because if people were to Buy the escrow they wouldn’t have full access to all the files making this pointless.

Update

:fr:

  • Ajout de la possibilitĂ© de choisir le style2.css, qui affiche une description supplĂ©mentaire pour l’étage.
  • Ajout d’une restriction via un JOB et mĂȘme le grade dans le fichier Config.lua.

:us:

  • Addition of the ability to choose style2.css' which displays additional description for the floor.
  • Addition of a restriction via a JOB and even the rank in the Config.lua file.

PREVIEW UPDATE

TEBEX (Escrow) - 3€ | Tebex (Open-Source) - 7€

I completely understand what you’re saying. However, I offer something inexpensive, which means that the person won’t have access to the entire source code. But with an additional payment, they can obtain the OPEN-SOURCE version.

Why do this, you might ask? Simply to prevent someone from reselling or giving away my script for only €3.

I myself have managed servers, and it’s true that buying a script without having access to everything can be annoying. That’s why I make a video to show what the person can modify in ESCROW mode. I show everything.

I totally understand the reasoning for this. As a server owner, yes I like full control over most things but there are also things I don’t really need source code on, like this for example. I almost bought the source version because it’s a very affordable price for it but at the same time, I realized that the way it’s already setup is 100% meeting my needs and I saw no need to spend the extra money for the source code. Things that I feel like I will want to tweak, I’m all for source but others where the dev has done a great job and is also supporting their work with updates, then I can save some money.

Indeed, hence the fact that on some of my scripts, I haven’t created an escrow version because I find it absurd to do so if it’s for the possibility of modifying things correctly.

I hope I have done a good job on this script; I’ve had dozens of purchases and only positive feedback.

Update :

  • :us: Modification of the code for the way of retrieving the profession and the rank for the ESX version
  • :fr: Modification du code pour la maniĂšre de rĂ©cupĂ©rer le mĂ©tier et le niveau du grade pour la version ESX
New code
    ESX = exports['es_extended']:getSharedObject()

    AddEventHandler('onResourceStart', function(resource)
        if resource == GetCurrentResourceName() then
            PlayerJobName = ESX.PlayerData.job.name
            PLayerJobGrade = ESX.PlayerData.job.grade
        end
    end)

    RegisterNetEvent('esx:playerLoaded')
    AddEventHandler('esx:playerLoaded', function(xPlayer)
        ESX.PlayerData = xPlayer

        PlayerJobName = ESX.PlayerData.job.name
        PLayerJobGrade = ESX.PlayerData.job.grade.level
    end)

    RegisterNetEvent('esx:setJob')
    AddEventHandler('esx:setJob', function(job)
        PlayerJobName = job.name
        PLayerJobGrade = job.level
    end)

(Already modified for people who bought it)

Now seeing the idea of job permissions to enable access to the elevator, I find myself wishing I had bought the open source version instead of the escrow. I had not even thought about restricting access but now I wish I had so I could modify it to use Ace Perms instead of Jobs since our server is standalone so I have no way to set “jobs”

What exactly do you like? (Maybe I could do it)

So for the elevator, it can be Public (like the original version had), check for a job, or check for an Ace Perm. (for example, for my use, I’d set an ace of Elevator.DPS for any elevator located in police stations that I don’t want public to use. Then in my existing Discord Ace Perm script, I would just give anyone with the DPS role in our discord the ace Elevator.DPS so when they attempt to use the elevator, the script would use something along the lines of if IsPlayerAceAllowed(source, Config.ElevPerm) then and if true, it would allow them to use it and if false then they would get a message saying they are not allowed to use it. (That is a very rough version as I would actually need to capture the specific perm for each elevator using pairs or whatever instead of just calling for the Config.ElevPerm as I would want to be able to have different perms per elevator but that’s the basic idea).

Honestly though, at the moment the only elevators I even want to restrict are ones that are in DPS buildings so a single perm and just an option in each elevator to check for none, job, or ace would do what I need. But if someone wanted to have different restrictions for LEO, Fire, and EMS, then that would need to have specific ace’s per elevator but I feel like most would be ok with a single perm as I feel most standalone servers don’t seperate the departmental restrictions near as much as ESX servers do and ESX is covered under the jobs function you have already

Okay, so when you talk about the native “IsPlayerAceAllowed”. We agree that you want to talk about the Rockstar license?

And I check if the player’s license and the list of those authorized to access the floor?

I’m not sure specifically if Ace perms are a GTA or FiveM function (I feel like it’s more FiveM but i don’t know tbh. I know I can set an ace perm on a player via steam or license natively or the way many of us do it is with a Discord ACE perm resource. We use one from Badger that gets a player’s discord roles and we have the script configured to look for certain roles. That script will give players Ace Principals based on if they have the matching Discord role and we can then assign those principals to specific Ace permissions.

For example, anyone in our Discord with the Staff Team role get assigned to the principal Staff.Group by Badger’s script. From there, we use add_ace Staff.Group "doorlock.staff" allow to give them access to a tool that lets them manage adding/removing locks on doors in the server as that script is looking to see if someone is Ace Allowed with doorlock.staff.

So basically, what I’m kinda looking for is the ability to have the elevators look for specific perms basically in place of doorlock.staff. Let’s say we use the example I used before of Elevator.DPS as the perm your script is looking for, I can then on our end outside of the elevator script do add_ace ncrp.DPS "Elevator.DPS" allow which would grant anyone with our DPS role in discord access to that Elevator.DPS perm.

There is a comment made by Faxes on a forum thread that covers this hopefully more clearly and he links to a post made by Vespura that details Aces and Principals more although Vespura’s post is much more about the side of this that we handle on our end as the server and not so much about the end script side but Faxes comment I’ll link here does give some examples Permissions on a command - #3 by FAXES

1 Like

Okay I see. I wrote it down and when I have time I will do it.

(So ​​in the Config and the elevator, you can define if you want to do the verification (Via the Job, via the Ace Permission or other verifications if it will be requested))

1 Like

Is it possible to have the UI go away after you select a floor? Currently you have to select the floor and then close the UI manually.

Hi, thanks for your proposal. I just updated the script and will elaborate on that in a response right below.

Someone who had purchased the script had requested this, and since it was open-source, it was easy. However, for the escrow versions, I had to set up something easy to configure, and that’s done now.

Update:

:fr:

Dans le fichier config.js, deux options possibles :

  1. OnTPRemoveUI = true fais en sorte de retirer l’affichage de l’ascenseur une fois arrivĂ© Ă  l’étage.

Si c’est dĂ©fini comme false , la personne devra appuyer sur la touche ECHAP (ou d’autres touches prĂ©vues Ă  cet effet) pour retirer l’affichage.


  1. AnimationDelay va ĂȘtre utilisĂ© pour dĂ©finir la durĂ©e du cooldown, permettant ainsi de rĂ©appuyer sur un autre Ă©tage. Assurez-vous de modifier le temps dans votre fichier style.css pour maintenir une animation cohĂ©rente avec le dĂ©lai.
style.css
.animate {
    animation: progress 1500ms; /* Just change the numbers to the ones you changed in > config.AnimationDelay  */ 
}

:us:

In the config.js file, two possible options:

  1. OnTPRemoveUI = true Make sure to remove the elevator display once you reach the floor.

If this is set to false, the person will have to press the ESC key (or other keys provided for this purpose) to remove the display.


  1. AnimationDelay will be used to define the duration of the cooldown, thus allowing you to press again on another floor. Make sure to change the time in your style.css file to keep the animation consistent with the time frame.
style.css
.animate {
    animation: progress 1500ms; /* Just change the numbers to the ones you changed in > config.AnimationDelay  */ 
}

Awesome! I really appreciate the quick response and fix for that! We love this elevator script and that detail, as small as it probably seemed, was really bugging us.

1 Like