# Installation

### Dependencies



## Asset download

1. **Download your resource from FiveM's Keymaster.**
2. **Unzip zip folder and place it into your resource folder.**&#x20;
3. **Add ensure l2s-Spying to your server start config. Make sure to place anywhere below the framework and dependencies resources.**

## installation

**1- Add this items in shared || qb-core/shared/items.lua**&#x20;

```lua
["gps_device"] = { 
["name"] = "gps_device",  
["label"] = "Spaying Device", 
["weight"] = 500,  
["type"] = "item",  
["image"] = "gps_device.png", 
["unique"] = true,  
["useable"] = true, 
["shouldClose"] = true,  
["combinable"] = nil,   
["description"] = "Special device for monitoring and tracking"
},

["gps_tablet"] = {  
["name"] = "gps_tablet",   
["label"] = "Spaying Tablet",  
["weight"] = 1000,  
["type"] = "item",   
["image"] = "gps_tablet.png", 
["unique"] = true,  
["useable"] = true,  
["shouldClose"] = true, 
["combinable"] = nil,  
["description"] = "data entry tablet device"
},

["note_ip"] = {  
["name"] = "note_ip",  
["label"] = "Contact Informations", 
["weight"] = 400,  ["type"] = "item",  
["image"] = "note_ip.png",  
["unique"] = true,   
["useable"] = false,  
["shouldClose"] = true,   
["combinable"] = nil,  
["description"] = "contact information"
},

["detector"] = { 
["name"] = "detector", 
["label"] = "Detector Device",  
["weight"] = 400,  
["type"] = "item",  
["image"] = "detector.png", 
["unique"] = true, 
["useable"] = false, 
["shouldClose"] = true, 
["combinable"] = nil, 
["description"] = "A device through which you can inspect a persons devices"
},
```



**2- Add images in inventory script || qb-inventory/html/images**

![](https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2FQtZyEJRmhdXERYWxszns%2Fimage.png?alt=media\&token=8b577662-6592-437e-92e1-c21bfb3c45f4)![](https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2FFQ2JIo6zQqRV4qE8pBdD%2Fimage.png?alt=media\&token=7e567a08-323c-4c4f-a740-de7288c42d71)![](https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2FcE5yBnR38Om6GNcM0p7d%2Fimage.png?alt=media\&token=1308a218-d896-49bc-b139-c75fd5e0a1a2)![](https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2FbspNdxjYQhBAlLNZB7w5%2Fimage.png?alt=media\&token=bdcde505-8b49-4a61-9ebb-35ef395a2358)





**3- qb-inventory/server/main.lua go to AddItem Function and add this like**  [<mark style="color:blue;">**image**</mark>](https://prnt.sc/AgtAUOqQ9iWN)

```lua
if item == 'gps_device' then
    info.ip = info.ip or math.random(1,9).."."..math.random(1,9).."."..math.random(1,9).."."..math.random(1,9)
    info.password = info.password or math.random(1,9)..math.random(1,9)..math.random(1,9)..math.random(1,9)
end
```

<figure><img src="https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2Fue9Hi8nqURtoUAbQ9H7I%2Fimage.png?alt=media&#x26;token=6bec2a98-ff00-4675-b3da-df721bc80da0" alt=""><figcaption><p><a href="https://prnt.sc/AgtAUOqQ9iWN"><mark style="color:blue;"><strong>Link</strong></mark></a></p></figcaption></figure>

4- **qb-inventory/html/app.js || Add items info show in inventory**

{% hint style="warning" %}
**If you use orginal inventory :**&#x20;
{% endhint %}

```javascript
} else if (itemData.name == "gps_device") {
    $(".item-info-title").html('<p>' + itemData.label + '</p>')
    const newLocal = '<p>IP:  ';
    $(".item-info-description").html(newLocal + itemData.info.ip + ' <p>Passsword:' + itemData.info.password);
    $(".item-info-stats").html('<p>Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + ' | Amount: ' + itemData.amount)
} else if (itemData.name == "note_ip") {
    $(".item-info-title").html('<p>' + itemData.label + '</p>')
    const newLocal = '<p>IP:  ';
    $(".item-info-description").html(newLocal + itemData.info.ip + ' <p>Passsword:' + itemData.info.password);
    $(".item-info-stats").html('<p>Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + ' | Amount: ' + itemData.amount)
```

**Like This :**&#x20;

<figure><img src="https://94117183-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA33F93eBCxt7JnedmZm5%2Fuploads%2FHjxOqo2NGmcYPpvEqmCH%2Fimage.png?alt=media&#x26;token=81adc252-f0ea-4ae0-98cc-a6060b0bb913" alt=""><figcaption><p><a href="https://prnt.sc/prK9vbzlJafu"><mark style="color:blue;"><strong>Link</strong></mark></a></p></figcaption></figure>

5- I**f you use our inventory \[ L2S V4 FILES ]**

```javascript
} else if (itemData.name == "gps_device") {
    $(".f9iteminfoname").html('<p>' + itemData.label + '</p>')
    const newLocal = '<p>IP:  ';
    $(".item-info-description").html(newLocal + itemData.info.ip + ' <p>Passsword:' + itemData.info.password);
    $(".item-info-stats").html('<p>Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + ' | Amount: ' + itemData.amount)
} else if (itemData.name == "note_ip") {
    $(".f9iteminfoname").html('<p>' + itemData.label + '</p>')
    const newLocal = '<p>IP:  ';
    $(".item-info-description").html(newLocal + itemData.info.ip + ' <p>Passsword:' + itemData.info.password);
    $(".item-info-stats").html('<p>Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + ' | Amount: ' + itemData.amount)
```

## Finally Customize Your setting in config.lua
