Skip to content

Commit

Permalink
Matrix board info
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexr03 committed Mar 25, 2024
1 parent 336fe5d commit 5f6e38d
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 22 deletions.
Binary file added x3_docs/images/X3DevLogoMax.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added x3_docs/images/matrix_dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added x3_docs/images/matrix_dot_bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added x3_docs/images/matrix_square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions x3_docs/redirection-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@
<description>Created after removal of "Starter" from x3 Docs</description>
<accepts>Starter.html</accepts>
</rule>
<rule id="3ea64de6">
<description>Created after removal of "Overview" from x3 Docs</description>
<accepts>Overview.html</accepts>
</rule>
<rule id="2a9ebbc2">
<description>Created after removal of "Adding Another Vehicle" from x3 Docs</description>
<accepts>Matrix_Adding-Another-Vehicle.html</accepts>
</rule>
</rules>
6 changes: 0 additions & 6 deletions x3_docs/topics/Config.md

This file was deleted.

7 changes: 6 additions & 1 deletion x3_docs/topics/Home.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Home

View project documentation on the sidebar
<img height="180" src="X3DevLogoMax.png" width="180" alt="logo"/>

View project documentation on the sidebar

## Links
- [Store](https://fivem.x3.dev)
19 changes: 18 additions & 1 deletion x3_docs/topics/MatrixBoards.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@
![banner](matrix_banner_single.png)

## Prerequisites

- [ox_lib](https://overextended.dev/ox_lib)

## Description
This Matrix Board resource provides a way to allow police, (or any job) to install matrix boards onto vehicles, with the ability to change the text, change the color, install/uninstall specific boards on the vehicle.

This Matrix Board resource provides a way to allow police, (or any job) to install matrix boards onto vehicles, with the
ability to change the text, change the color, install/uninstall specific boards on the vehicle.

## Features

- Allows for many matrix boards on a single vehicle, each being toggleable.
- When text becomes too large to show, text will begin to scroll
- Configurable scroll speed
- Auto text centering
- 2 fonts available (DOT & SQUARE)
- Emissive textures (glowing text in dark)
- Configurable text switching speed
- Exports to allow you to create your own installation system
- Any text color can be used
- Exposed methods to allow you to define logic for who can use the matrix board menu.

## Credits

- [D3lta Development Studios](https://discord.gg/5juPxXNZ8t) For providing the 3D models and textures
29 changes: 29 additions & 0 deletions x3_docs/topics/Matrix_Changing-Font.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Changing Font

By default the matrix board comes with 2 fonts. **DOT** & **SQUARE**

<procedure title="How to change font" id="matrix_how_to_change_font">
<step>Navigate to the resource folder</step>
<step>Open up <code>/html/D3s_Matrix/style.css</code></step>
<step>Find <code>#sign</code> and change the <code>font-family</code> field to either: <code>matrix-square</code> **OR** <code>matrix-dot</code></step>
<step><i>Optional but recommended for square font:</i> For the bold variant the fonts. Set <code>font-weight</code> to <code>bold</code></step>
</procedure>

## Images

### SQUARE

(Default)
![Square Image](matrix_square.png)

### DOT

(2 variants)

#### Bold

![Dot Image](matrix_dot_bold.png)

#### Normal

![Dot Image](matrix_dot.png)
6 changes: 6 additions & 0 deletions x3_docs/topics/Matrix_Config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Config

Below you will find the default configs provided with the resource

- [config.lua](Matrix_Default-Config)
- [config_matrixboards.lua](Matrix_Default-Matrix-Config)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Default Config
{id="matrix_default_config"}

Below is the default `config.lua` file.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Default Matrix Config
{id="matrix_boards_default_config" title="Matrix Boards Default Config"}

Below is the default `config_matrixboards.lua` file.

Expand Down
15 changes: 8 additions & 7 deletions x3_docs/topics/Exports.md → x3_docs/topics/Matrix_Exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
You are provided a few exports so you can customize this script to your liking, whether implementing your own system to
install the matrix boards onto the vehicles to using an item to open the menu, etc.

| Server/Client | Export | Description | Parameters | Return Type |
|---------------|---------------------------------|--------------------------------------------------------------------------------------|------------------------------------------|----------------|
| Client | CanOpenMatrixMenu | Returns true/false whether the menu can be opened by the player | N/A | Boolean |
| Client | GetVehicleConfig | Gets the vehicle config for the given hash. If nil, no config exists for given model | Model | VehicleConfig? |
| Client | InstallMatrixOnVehicle | Installs the matrix boards onto the given vehicle. True if successful | Vehicle Handle | Boolean |
| Client | UninstallMatrixBoardFromVehicle | Uninstalls the matrix board from the given vehicle. True if successful | Vehicle Handle | Boolean |
| Client | SendMatrixBoardMessage | Sends matrix board UI message to the given vehicle | Vehicle Handle, MatrixUIData, boardIndex | nil |
| Server/Client | Export | Description | Parameters | Return Type |
|---------------|---------------------------------|--------------------------------------------------------------------------------------|-------------------------------------------|----------------|
| Client | CanOpenMatrixMenu | Returns true/false whether the menu can be opened by the player | N/A | Boolean |
| Client | GetVehicleConfig | Gets the vehicle config for the given hash. If nil, no config exists for given model | Model | VehicleConfig? |
| Client | InstallMatrixOnVehicle | Installs the matrix boards onto the given vehicle. True if successful | Vehicle Handle | Boolean |
| Client | UninstallMatrixBoardFromVehicle | Uninstalls the matrix board from the given vehicle. True if successful | Vehicle Handle | Boolean |
| Client | SendMatrixBoardMessage | Sends matrix board UI message to the given vehicle | Vehicle Handle, MatrixUIData, boardIndex? | nil |

## Types

### VehicleConfig

```text
{
Distance = 75.0, -- Distance from the vehicle to start rendering in the matrix boards
MatrixBoards = { -- List of all matrix board positions
{
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions x3_docs/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">

<ihp version="2.0">
<!-- <topics dir="topics" web-path="topics"/>-->
<!-- <images dir="images" web-path="images"/>-->
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<categories src="c.list"/>
Expand Down
11 changes: 6 additions & 5 deletions x3_docs/x3_docs.tree
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

<toc-element topic="Home.md"/>
<toc-element topic="MatrixBoards.md">
<toc-element topic="Installation.md"/>
<toc-element topic="Config.md">
<toc-element topic="Default-Config.md"/>
<toc-element topic="Default-Matrix-Config.md"/>
<toc-element topic="Matrix_Installation.md"/>
<toc-element topic="Matrix_Config.md">
<toc-element topic="Matrix_Default-Config.md"/>
<toc-element topic="Matrix_Default-Matrix-Config.md"/>
</toc-element>
<toc-element topic="Exports.md"/>
<toc-element topic="Matrix_Exports.md"/>
<toc-element topic="Matrix_Changing-Font.md"/>
</toc-element>
</instance-profile>

0 comments on commit 5f6e38d

Please sign in to comment.