Comment on page
This script supports user-made plugins.
- 1.Open the root folder of
visn_are, there should be a
pluginsfolder, open it.
- 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.luaand edit the
- 6.Do the same for
- 7.Now rename the two files to your custom name, but this format is important:
- 2.Type can be: 'server' or 'client' -> It will decide if it will execute on client or server.
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
Inside of the
RegisterClientPluginfunction we will put our logic.
To permanently print a message when our heart rate is below 80, we need a
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
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!".