[RELEASE] [ESX] Documents

ESX Documents


https://i.imgur.com/N4xRwfa.png

npm version License: GPL v3


Download: Link
** Please make sure you read the instructions below. I will provide support for issues only at the github repo page.

** Special thanks to psycodeliccircus for further translating the script and adding BR language.
** Special thanks to user @Max_Muller for providing a German translation.

Introduction

Introducing Documents, a great roleplaying addition script for fivem servers using the esx framework. This script provides creation, signing, copying and displaying of documents to enrich players’ roleplaying experience. Basically you have two type of documents:

  • Public documents

    • Affirmation form
    • Witness testimony
    • Vehicle convey statement
    • Debt statement towards citizen
    • Debt clearance decleration

    These are accessible by everyone and are mostly documents required by services or other jobs to be filled and signed by you for some purpose.

  • Job specific documents

    • [police] Special parking permit
    • [police] Gun permit
    • [police] Clean citizen criminal record
    • [ambulance] Medical report - pathology
    • [ambulance] Medical report - psychology
    • [ambulance] Medical report - eye specialist
    • [ambulance] Marijuana use permit
    • [avocat - lawyer] Legal services contract

    These are documents available only to assigned jobs and consist of documents that need to be filled and signed by people working that specific job. Examples are licenses, reports, permits

Features

The following document functions are available

  • Create
  • Sign
  • Show
  • Give Copy
  • Delete
  • Public documents
  • Job specific documents
  • Custom documents creation
  • Localization (gr/en/br/de)

Requirements

  • ESX framework

Download & Installation

Important note:
Make sure your resource folder name is esx_documents. Anything else will make the script malfunction.

Using Git

Manually

Installation

Import esx_documents.sql in your database
Add this in your server.cfg :

start esx_documents

How to use

Unless specified otherwise (in the config file) the hotkey assigned for the documents menu is “L”. Releasing it will open up the main menu. From there you can chose to access publicly available documents, job-specific documents or your saved documents. The menu is pretty straightforward. This script comes with some common premade forms for you but if you want to create your own check out the following section.

How to create your own document.

Each document is assigned to a specific category. This category can be public for everyone or a job name to be accessible only by citizens in that specific job.
Each document consists of a headerTitle, headerSubtitle and elements.
headerTitle and headerSubtitle are self explanatory.
Elements are the fields which a user fills in, in a document.
An element, so far, can either be input or textarea.
Each element has the following properties:

  • can_be_empty : true/false which means a user can submit the form without filling that specific element
  • can_be_edited : true/false which means a user can edit this element’s content. Usefull for documents with static values.

So let’s see an example. Let’s say we want to create a witness testimony document. This can be filled by anyone so we put it in the public section. Also we want the citizen to fill in the date of occurence and his testimony. Hence we have:

-- We add our document to the public section
-- Click the image below to see the code translation
["public] ={
        {
          headerTitle = "WITNESS TESTIMONY",
          headerSubtitle = "Official witness testimony.",
          elements = {
            { label = "DATE", type = "input", value = "", can_be_emtpy = false },
            { label = "TESTIMONY", type = "textarea", value = "", can_be_emtpy = false },
          }
        },
        ....
}

Other scripts by me:

[RELEASE] ESX Deliveries
[Release] [ESX] ESX_Cargodelivery
[Release] [ESX] ESX_CommunityService

48 Likes

Great Work! Keep it up! :fire:

1 Like

Used your esx_communityservice and using this too, you are awesome keep up the great work.

2 Likes

That is quite unique script, love your work mate hope to see some more creative and unique scripts at the future.

2 Likes

Another great script.
Thank you.

Gonna try it.
Thank you sirr.

Hi thanks for your work, I have a little trouble posting if you have an idea ?
https://gyazo.com/1717ae34398b4786f05ec960129c4edc

When opening menu stays so for me I can not see the options

1 Like

@NiNeTe @CLOS
config.lua change Config.UseCustomFonts to false and also in client.lua change line
MENU_OPTIONS.font = 2
to
MENU_OPTIONS.font = 4

Or download the repo again, i updated it. Thanks for notifying me. the issue is fixed

1 Like

ok thank i try

this is really amazing, only bug i’m dealing with is when i open some kind of document, i close it but menu stays and it freezes. I can’t choose anything, i can’t close it.

12 Likes

@Apostolos_Iatridis

Ok thank you very much it works, another problem when I make a document once finished I can not close the menu all remains frozen
the mouse works

Thank you for your hard work!

Same thing occurs on my end.
Fill Out all fields click submit - stuck at main menu
Cancelling the form with X in top right - stuck at main menu

@NiNeTe
@bitbytes
@3om9z

Please save the script folder and resource name as instructed. esx_documents

sorry oops I had forgotten the D by d to replace

(hides in corner embarrassed)

2 Likes

I am very excited to test this out, Very Creative and wonderfully designed. I love the new additions you have released! Great work keep it up

1 Like

@Apostolos_Iatridis
Is there a way to make a document that all players get it when they spawn?

Addinventoryitem when they spawn or respawn

Wow, this is great! I haven’t tested it yet but this will improve the realism in the RP so much. I’ve made my own already, but yours looks dope too and I hope people will like this, because it have helped my server very much!

Good job once again!

2 Likes