apoiat / ESX_Documents

Ingame document filling, signing and exchanging platform for fivem, esx platform
52 stars 43 forks source link
# ESX Documents [![npm version](https://img.shields.io/github/release/apoiat/ESX_Documents.svg?style=flat)](https://github.com/apoiat/ESX_Deliveries "View this project on npm") [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ____

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:

Features

The following document functions are available

Requirements

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:

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.