# How to Install

Important things to install! Follow the steps carefully and you shouldn't have a problem.

{% hint style="info" %}
Make sure to follow all steps, step by step, if you encounter errors please recheck that you've completed step 1-3 correctly.
{% endhint %}

## Step 1

* Insert VT-Surfing.Pack into your server
* Remember to Ensure vt-surfing in your server.cfg

## Step 2

* Run the resource before all resources in server.cfg

<pre><code># These resources will start by default.
ensure mapmanager
ensure chat
ensure spawnmanager
ensure sessionmanager
ensure basic-gamemode
ensure hardcap
ensure baseevents

# QBCore &#x26; Extra stuff
ensure qb-core
# VT Scripts
<strong>ensure vt-surfing
</strong>#Of course if you use the mlo that comes with the resource!
ensure vt-surfboard
<strong>ensure cfx-vt-rent-surf
</strong></code></pre>

## Step 3

* Add the following to your ox\_inventory

{% tabs %}
{% tab title="Items" %}
Go to - ox\_inventory/data/items.lua\
\--------------------------------\
And add this to your items

```lua
--VT Surfing
	["surfingpapers"] = {
		label = "Surfing Papers",
		weight = 1,
		stack = false,
		close = true,
		notification = 'Surfing documents. You have known surf for rent. You need this document to return it.'
	},
```

{% endtab %}

{% tab title="Shop" %}
Go to - ox\_inventory/data/shops.lua\
\--------------------------------\
And add this to your shops

```lua
	Surfing = {
		name = 'Shop', 
		inventory = {
			{ name = 'burger', price = 15 },
			{ name = 'water', price = 10 },
			{ name = 'cola', price = 10 },
		}, locations = {
			vec3(-1339.160400, -1625.472534, 2.893066),
		}, targets = {
			{ loc = vec3(-1339.160400, -1625.472534, 2.893066), length = 0.7, width = 0.5, heading = 0.0, minZ = 29.5, maxZ = 29.9, distance = 1.5 },
		}
	},
```

{% endtab %}

{% tab title="images" %}
Download and upload this to your images folder. It's way more implicit

A folder - **ox\_inventory\web\images**<br>

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRR2HHhh4DevdgfKaSdlq%2Fuploads%2FGdteyEsrI08RCsqAuM8Q%2Fsurfingpapers.png?alt=media&#x26;token=83050da4-94e9-4c11-811b-0ce42b628608" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

## Config

```lua
Config = {
  CoreScriptName             = 'es_extended', -- 'es_extended' This is a change to your resource name, namely core, the original one which is ESX
  CoreName                   = 'ESX', -- 'ESX' This is a change to your resource name, namely core, the original one which is ESX
  SpawnVehicle               = vector4(-1418.88, -1648.82, -0.47, 119.9), -- Spawn location for surfing
  SpawnHeading               = 119.9, -- Spawn Heading for surfing
  SurfTzone                  = 0.5, -- Target zone
  paymentsurfing             = 400, -- Surf rental price as a deposit!
  ProgressbarTime            = 1500, -- Time for a progressbar
  surfingpapers              = "surfingpapers", -- Items required for return.
  Fuel                       = 'LegacyFuel:SetFuel', -- Your fuel system
  FuelValue                  = 100.0, -- amount of fuel at spawn
  Vehicle                    = 'surfboard',
  Blips   = { name = "Surf area"}, --Name blips surfing
  Zones = {
    LocationVehicleEntering2 = {
        Pos = {x = -1371.85, y = -1624.87, z = 2.73},
        Size = { x = 1.5, y = 1.5, z= 0.5},
        Color = {r = 209, g = 255, b = 0},
        Type = 1,
    },
  },
  ----------------------------------------
	---     ALL PEDS SURFING SCRIPTS     ---
	----------------------------------------
  --FiveM's list of Ped Models can be found here: https://docs.fivem.net/docs/game-references/ped-models/
  --A list of all the animations can be found here: https://alexguirre.github.io/animations-list/
  Invincible = true, --Do you want the peds to be invincible?
  Frozen = true, --Do you want the peds to be unable to move? It's probably a yes, so leave true in there.
  Stoic = true, --Do you want the peds to react to what is happening in their surroundings?
  Fade = true,-- Do you want the peds to fade into/out of existence? It looks better than just *POP* its there.
  Distance = 15.0, --The distance you want peds to spawn at
  --Does the system you use for grabbing coordinates require subracting from the z axis?
  --If so, set this to true. You'll have to adjust the coordinates for defaults down - 1 if you set false.
  MinusOne = true,
  PedList = {
	----------------------------------------
	---          PEDS RENT           ---
	----------------------------------------
	{
		model = "s_m_y_baywatch_01", --The model name. See above for the URL of the list.
		coords = vector3(-1371.77, -1624.87, 3.73), --HAIR ON HAWICK AVE
		heading = 118.75, --Must be a float value. This means it needs a decimal and a number after the decimal.
		gender = "female", --Use male or female
		--animDict = "", --The animation dictionary. Optional. Comment out or delete if not using.
		--animName = "", --The animation name. Optional. Comment out or delete if not using.
	    isRendered = false,
        ped = nil,
  },
  ----------------------------------------
	---          PEDS RENT           ---
	----------------------------------------
	{
		model = "s_m_y_clown_01", --The model name. See above for the URL of the list.
		coords = vector3(-1338.0, -1625.09, 3.09), --HAIR ON HAWICK AVE
		heading = 98.3, --Must be a float value. This means it needs a decimal and a number after the decimal.
		gender = "female", --Use male or female
		--animDict = "", --The animation dictionary. Optional. Comment out or delete if not using.
		--animName = "", --The animation name. Optional. Comment out or delete if not using.
	    isRendered = false,
        ped = nil,
  },
}
}

Lang = {
  --ESX Menu Translation
  ["mheader"]      = "Surfing",
  ["mlabel"]       = "Rent Surf",
  ["mtxt"]         = "Rent a surfboard for $ 400",
  ["mexit"]        = "Exit",

  --ESX Target Translation
  ["Talk"]         = "Talk to rent surf",
  ["Take"]         = "Take Depo Surf",
  ["Shops"]        = "Surfing Shops",

  --Spawn Vehicle Translation
  ["yourent"]      = "You rented a surfboard",
  ["youowner"]     = "You've already surfed",
  ["nomoney"]      = "You don't have enough money, poor thing!",

  --Delete Vehicle Translation
  ["takerent"]     = "You returned the surfboard back to the savior!",
  ["notakerent"]   = "No surfboard to return",

  --ProgressBar
  ["progheade"]   = "Hiring..",
  ["progcancel"]  = "Something went wrong",

  --Notify OX
  ["oxtittle"] = "Notification Surfing",
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vt-developmets.gitbook.io/vt-scripts/our-scripts/our-paid-scripts-esx/surfing/how-to-install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
