# Roadhelper

{% hint style="warning" %}
**Make sure to add the necessary items, item images and job names required for the job**
{% endhint %}

***

* <mark style="background-color:yellow;">**\["name"]:**</mark> It is the label that will appear in menus or notifications.
* The <mark style="background-color:yellow;">**\[‘menu’]**</mark> variable consists of things related to the location from which the job is to be retrieved
  * <mark style="background-color:orange;">\["job\_menu"]:</mark> <mark style="color:yellow;">@vector3</mark> Accepts. The menu access location of the  job.
  * <mark style="background-color:orange;">\["interaction\_distance"]:</mark> <mark style="color:yellow;">@float</mark> Accepts. The player distance controlled to access the menu.

***

## 🚗Operator Car / Car Settings&#x20;

Contains the details of the operator vehicle. You can enter spawn location and vehicle type.

* <mark style="background-color:orange;">\["model"]:</mark> <mark style="color:yellow;">@string</mark> You can enter the vehicle model here. Be careful to enter a valid vehicle.
* <mark style="background-color:orange;">\["spawnCoords"]:</mark> <mark style="color:yellow;">@vector4</mark> Accepts. It is the position where the vehicle will emerge. The direction your character is facing is the direction the front of your vehicle will face.

***

## 🔩Props attached to the vehicle

Roadside assistance items that come on the towtruck when it arrives

* <mark style="background-color:yellow;">**"jack\_stand || spare\_wheel || jerry\_can"]:**</mark> Prop settings.
  * <mark style="background-color:orange;">\["car\_attach"]:</mark> The necessary settings for the prop to be a paperclip for the car back
    * <mark style="background-color:red;">\["bone"]:</mark> <mark style="color:yellow;">@number</mark> Select the appropriate one of the bonnets that the back have.
    * <mark style="background-color:red;">\["coords"]:</mark> <mark style="color:yellow;">@vector3</mark> It is the offset to be added to the 0.0 position of the boot.
    * <mark style="background-color:red;">\["rotation"]:</mark> <mark style="color:yellow;">@vector3</mark> The location, direction and heading settings of the Prop when attaching it to the back.
  * <mark style="background-color:orange;">\["player\_attach:]:</mark> Prop settings between the prop and the player.
    * <mark style="background-color:red;">\["bone"]:</mark> <mark style="color:yellow;">@number</mark> Select the appropriate one of the back that the player have. [**AltV - Ped Bones**](https://docs.altv.mp/gta/articles/ped/bones.html)
    * <mark style="background-color:red;">\["coords"]:</mark> <mark style="color:yellow;">@vector3</mark> It is the offset to be added to the 0.0 position of the player.
    * <mark style="background-color:red;">\["rotation"]:</mark> <mark style="color:yellow;">@vector3</mark> The location, direction and heading settings of the Prop when attaching it to the player.
    * <mark style="background-color:red;">\["animName"]:</mark> <mark style="color:yellow;">@string</mark> Animation name.
    * <mark style="background-color:red;">\["animDict"]:</mark> <mark style="color:yellow;">@string</mark> Animation directory name.

***

## ⛓️‍💥Random Road events

Settings required for random roadside assistance calls in this occupation.These are contained in the <mark style="background-color:yellow;">**\[‘randomEvents’]**</mark> table.

<mark style="background-color:yellow;">**\["event\_timer"]**</mark>: <mark style="color:yellow;">@number</mark> My call timer recommendation is to keep it high or average.

<mark style="background-color:yellow;">**\["events"]**</mark>: <mark style="color:yellow;">@object</mark> Table containing random roadside assistance incidents.

* <mark style="background-color:yellow;">**\[index]**</mark>: <mark style="color:yellow;">@number</mark>  This is a job number. The maximum number of jobs found should be written by adding +1. If there are no jobs, it should start from 1.
* ## 🕙Timer
* There is only one set timer for deliveries. You can understand it by reading the following variables.
  * <mark style="background-color:orange;">\["mission\_time"]:</mark> <mark style="color:yellow;">@number</mark> Time to be entered for complete. ***Minutes \* 60 \* 1000.***
  * <mark style="background-color:orange;">\["extra\_time"]:</mark> <mark style="color:yellow;">@number</mark> Extra time to be added after the specified complete time has expired. ***Minutes \* 60 \* 1000***
  * <mark style="background-color:orange;">\["deducted\_per\_min"]:</mark> <mark style="color:yellow;">@number</mark> If extra time is activated, a fee will be deducted from the reward for each ‘One’ minute spent.
* <mark style="background-color:yellow;">**\["type"]**</mark>: <mark style="color:red;">IMPORTANT</mark> ⇒ <mark style="color:yellow;">@string</mark> There are 3 different types: fuel\_help, change\_wheel and towing.
* <mark style="background-color:yellow;">**\["label"]**</mark>: <mark style="color:yellow;">@string</mark> The name that will appear to the user during the call phase.
* <mark style="background-color:yellow;">**\["reward"]**</mark>: <mark style="color:yellow;">@number</mark> The player's reward for this service.
* <mark style="background-color:yellow;">**\["car\_stuff"]**</mark>: <mark style="color:yellow;">@object</mark> This is the settings section related to the vehicle that appears in roadside assistance and other properties of the vehicle depending on the type of assistance.
  * <mark style="background-color:orange;">\["model"]:</mark> <mark style="color:yellow;">@string</mark> You can enter the vehicle model here. Be careful to enter a valid vehicle.
  * <mark style="background-color:orange;">\["coords"]:</mark> <mark style="color:yellow;">@vector4</mark> Accepts. It is the position where the vehicle will emerge. The direction your character is facing is the direction the front of your vehicle will face.

***

{% hint style="danger" %} <mark style="color:red;">**For fueal\_help:**</mark>

At the bottom of the car\_stuff table for the fuel\_help Type, please put the bone id of the vehicle's fuel tank. As in the example:

<pre class="language-lua"><code class="lang-lua"><strong>["fuel_bone"] = 15,
</strong></code></pre>

{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**For change\_wheel:**</mark>&#x20;

At the bottom of the car\_stuff table for the change\_well Type, please enter the closest bone id, tyre id and offset and rotation settings for the jack. As in the example:

```lua
["tyre_bone"] = 50,
["tyre_index"] = 0,
["jack_attach"] = {
    ["coords"] = vec3(0.0, 0.0, 0.0),
    ["rotation"] = vec3(0.0, 0.0, 0.0),
}
```

{% endhint %}

{% hint style="success" %}
He**re wheel/tyre index:**

```
'0 = wheel_lf / bike, plane or jet front  
'1 = wheel_rf  
'2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left  
'3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right  
'4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left  
```

{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**For towing:**</mark>&#x20;

For towing, please go outside the car\_stuff table and underneath please enter the location where the vehicle is to be delivered.

```lua
["delivery_coords"] = vec3(0.0, 0.0, 0.0),
```

{% endhint %}
