⚙️
veryinsanee.space
  • Welcome!
  • Store
  • Advanced Roleplay Environment
    • Installation
    • Guides
      • Basic Gameplay Guide
        • Medications
        • Wounds & Bandages
        • Blood Loss, IVs, Stabilzation
        • Surgical Kit & Emergency Revive Kit
        • Cardiac Arrest & CPR
        • Mass-Casualty Incidents & Triage
        • Heart Rate & Blood Pressure
      • Basic Configuration Guide
        • Client Configuration
        • Server Configuration
      • Advanced Configuration Guide
        • Adding injuries
        • Adding damage types
        • Adding medications
        • Adding bandages
        • Adding infusions
        • Adding menu actions
    • API Reference
    • Plugin Support
  • veryinsanee's Whitelist
    • Installation
Powered by GitBook
On this page
  • How to create a custom plugin
  • Basic Preparation
  • Let's create our own content!
  • We are done!
  • Questions

Was this helpful?

  1. Advanced Roleplay Environment

Plugin Support

PreviousAPI ReferenceNextInstallation

Last updated 5 months ago

Was this helpful?

This script supports user-made plugins.

How to create a custom plugin

Basic Preparation

  1. Open the root folder of visn_are, there should be a plugins folder, open it.

  2. Download the from our github page.

  3. Drag and drop the folder inside the plugins folder.

  4. Now rename the folder to your custom name.

  5. Open the plugin_test_client.lua and edit the pluginData.

  6. Do the same for plugin_test_server.lua.

  7. Now rename the two files to your custom name, but this format is important:

    1. plugin_NAME_TYPE.lua

    2. Type can be: 'server' or 'client' -> It will decide if it will execute on client or server.

Let's create our own content!

Let's create a plugin that prints a message when our heart rate is below 80.

Since this will be a client-side-plugin, we will open our client-side plugin file. (In this case plugin_test_client.lua)

Inside of the RegisterClientPlugin function we will put our logic.

To permanently print a message when our heart rate is below 80, we need a thread and a while-loop.

Since everything in the if-statement will only trigger when the heart rate is below 80 we will just print "Low on health!" inside the statement.

The basic logic is done, but we need to prevent a client-crash so let's implement a Citizen.Wait-call inside the while-loop.

We are done!

After the resource has been started (or restarted) the plugin will load.

Now when are ingame and the heart rate is below 80, the console is getting spammed with "Low on health!".

Questions

Which functions can I use?

After we implemented it, we will access the and do a check if the heart rate is below 80.

Take a look at the .

sample plugin
API Reference
client health buffer