Giter Site home page Giter Site logo

esx_documents's Introduction

ESX Documents

npm version License: GPL v3


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

cd resources
git clone https://github.com/apoiat/ESX_Documents [esx]/esx_documents

Manually

Download https://github.com/apoiat/ESX_Documents/archive/master.zip

Rename folder to esx_documents

Put it in the [esx] directory

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 on the left 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 },
        }
      },
      ....
}

Translations and implementation by ESX-Brasil

Special thanks to fivem user Max_Muller for providing a German translation.

esx_documents's People

Contributors

apoiat avatar ereshkigalfr avatar gouartzo avatar psycodeliccircus avatar rocogamer avatar tanguyortegat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esx_documents's Issues

Can't write two line

When I write 2 line in a document and press submit the menu not show up to save or anything.

document adding

There is no obvious place to add new and custom documents. Can you explain to me where the documents that are already implemented are and tell me where to add new ones? which file/script do I edit

cancel button not working

Cancel button is not working, pressing escape button works for dismissing the document, but on creating a form the cancel button doesn't work

Job documents not showing for "mechanic"

["mechanic"] = {
{
headerTitle = "COTIZACIÓN PARA MODIFICACIONES",
headerSubtitle = "Documento con los detalles y valores para la modificación de un vehículo.",
elements = {
{ label = "NOMBRE DE CLIENTE", type = "input", value = "", can_be_emtpy = false },
{ label = "APELLIDO DE CLIENTE", type = "input", value = "", can_be_emtpy = false },
{ label = "FECHA DE EMISIÓN", type = "input", value = "", can_be_empty = false },
{ label = "DETALLE", type = "textarea", value = "En este recuadro deben especificar las piezas y el valor de cada una a modo de cotización para un cliente. Recuerde hacerlo con orden y que sea entendible.", can_be_emtpy = false },
}
},
{
headerTitle = "FACTURA MECÁNICA",
headerSubtitle = "Documento que menciona el trabajo hecho por un mecánico y sus detalles.",
elements = {
{ label = "NOMBRE DE CLIENTE", type = "input", value = "", can_be_emtpy = false },
{ label = "APELLIDO DE CLIENTE", type = "input", value = "", can_be_emtpy = false },
{ label = "FECHA DE EMISIÓN", type = "input", value = "", can_be_empty = false },
{ label = "DETALLE", type = "textarea", value = "El mecánico debe especificar detalladamente qué trabajo hizo y los valores de este. Abarca reparaciones, modificaciones, limpieza, remolque, etc. Recuerde hacerlo de manera ordenada y entendible.", can_be_emtpy = false },
}
}

support for double jobs

i ll post some issues, but each in separate thread.
First of all this is a great script, you do save me a lot of time in rp writing reports and so on but in the first 5 minutes of testing i do have found some issues. The first one, is supporting servers that have double jobs. Would be great when opening a menu, that we first can choose what job (first or second and then open the menus.

Documents disappear when user logs out, but stay in database

Hello,
[esx_ext. 1.2 and onesync]

i try to make a document - and give a copy to a user. But wehn i log out, and log back in wether i nor the other user keeps the docuemnt in the menue.

Then i looked at database, theres the Docment in.

What can i do ? :)

view document not editable

Now if we view a document we can edit it, but it won't save, the best thing to do is making so that we cannot edit the document

Greek fonts

Hello. In the Greek menu. The greek letters is not showing. Can you help me ?

Thank you in advance.

can i add new catagorys

how do i add a new category eg like police or ems so if wanted to set up a category for a private job so only they can be the only one to see said forms

Physical Database for Documents

Is there any way to implement a physical database for the documents. Such as say a filing cabinet in the police station to put arrest reports or a filing cabinet in the mechanic shop to put receipts. Would be extremely useful for roleplay. (And I know this isn’t an issue I just wasn’t sure where else to post it)

Selecting document doesn't remove menu

I'm able to make a public document, but the menu doesn't go away, and can't interact with it. Nor can I press my key to bring it up again to interact with either, or even hit esc to bring up that menu.

After submitting the document game freezes

I pressed L, wrote random words and dates. Pressed submit, game freezes and I need to restart resource. I attach screenshot of f8 console as the only strange thing I see is the "WTFFFFF!".
Screenshot_225

Cursor and Dialogue stuck on screen

As the other guy said,

Once you submit the document, the Cursor and L Dialogue GUI is stuck on your screen, you cant get rid of it without restarting the script, or quitting the server

In-game documents go missing: game quit

How come the in-game player to player submitted documents disappear once the quit. It's like the documents are available only as long as u stay online, once you reconnect or quit.. it's gone..
Can be solved?

create a scroll menu

what would be great is greate a scroll menu on saved documents. Becasue once we got lot's of documents, speaking about cops and so on, players will have a lot of documents and now we cans scroll and the list is out of range of our screen.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.