Giter Site home page Giter Site logo

grimshadwz / esx_documents Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apoiat/esx_documents

0.0 0.0 0.0 401 KB

Ingame document filling, signing and exchanging platform for fivem, esx platform

Lua 79.86% CSS 5.34% HTML 0.48% JavaScript 14.32%

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.

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.