# Table of Contents
- [inside-scripts](#inside-scripts)
- [🔑 Vehicle Keys | inside-scripts](#-vehicle-keys-inside-scripts)
- [🚗 Garage | inside-scripts](#-garage-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [🗯️ Dialog V2 | inside-scripts](#-dialog-v2-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [🪛 Lock Picking | inside-scripts](#-lock-picking-inside-scripts)
- [📰 Interaction | inside-scripts](#-interaction-inside-scripts)
- [🖥️ Bridge & Library | inside-scripts](#-bridge-library-inside-scripts)
- [🪧Notifications and Progress | inside-scripts](#-notifications-and-progress-inside-scripts)
- [Compatibility | inside-scripts](#compatibility-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Usage & Installation | inside-scripts](#usage-installation-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Functions | inside-scripts](#functions-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [🥦 Weed Laboratory | inside-scripts](#-weed-laboratory-inside-scripts)
- [🗯️ Dialog V1 | inside-scripts](#-dialog-v1-inside-scripts)
- [Inventory | inside-scripts](#inventory-inside-scripts)
- [inside-scripts](#inside-scripts)
- [🖥️ Bridge & Library | inside-scripts](#-bridge-library-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Progress Bar | inside-scripts](#progress-bar-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [🔑 Vehicle Keys | inside-scripts](#-vehicle-keys-inside-scripts)
- [💊 Sell Drugs | inside-scripts](#-sell-drugs-inside-scripts)
- [Shared | inside-scripts](#shared-inside-scripts)
- [Identifier | inside-scripts](#identifier-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Keys | inside-scripts](#keys-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Fuel | inside-scripts](#fuel-inside-scripts)
- [Notification | inside-scripts](#notification-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Bridge | inside-scripts](#bridge-inside-scripts)
- [Callback | inside-scripts](#callback-inside-scripts)
- [Target | inside-scripts](#target-inside-scripts)
- [Script Functionality Overview | inside-scripts](#script-functionality-overview-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Library | inside-scripts](#library-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Script Functionality Overview | inside-scripts](#script-functionality-overview-inside-scripts)
- [Config | inside-scripts](#config-inside-scripts)
- [Framework | inside-scripts](#framework-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Webhook | inside-scripts](#webhook-inside-scripts)
- [Blip | inside-scripts](#blip-inside-scripts)
- [Timezone | inside-scripts](#timezone-inside-scripts)
- [Entity | inside-scripts](#entity-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Client | inside-scripts](#client-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Utility | inside-scripts](#utility-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
- [Server | inside-scripts](#server-inside-scripts)
---
# inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation#about-us)
About Us
---------------------------------------------------------------------------------
Inside-Script, a team of two developers, has been crafting scripts for FiveM for five years. We focus on innovative, high-quality scripts compatible across FiveM's diverse landscape, from basic job scripts to complex narrative missions with NUI interactions and custom models.
[hashtag](https://inside-scripts.gitbook.io/documentation#terms-of-service)
Terms of Service
-------------------------------------------------------------------------------------------------
Unauthorized use or distribution of Inside-Script's resources, both free and paid, is strictly forbidden. Users are accountable for the proper use of scripts and associated tokens.
Violations will result in:
1. Banning of the involved account and email from Inside-Script’s platform.
2. Discord account ban from Inside-Script’s community.
3. No refunds for revoked or banned assets.
4. DMCA notices to any involved Discord servers or hosting services, likely leading to their shutdown.
5. Reporting to the FiveM administration for servers using leaked scripts.
At Inside-Script, our priority is to innovate and provide exceptional scripts and support to the FiveM community. We dedicate our time to development and customer support rather than combating script leaks.
[hashtag](https://inside-scripts.gitbook.io/documentation#support)
Support
-------------------------------------------------------------------------------
Our support includes detailed documentation and installation guides. We assist our customers and confirmed developers through our [**Discord**arrow-up-right](https://discord.com/invite/URKNMSwx5W)
channel via ticket-based support. We expect basic Lua coding knowledge from our customers.
Last updated 1 year ago
* [About Us](https://inside-scripts.gitbook.io/documentation#about-us)
* [Terms of Service](https://inside-scripts.gitbook.io/documentation#terms-of-service)
* [Support](https://inside-scripts.gitbook.io/documentation#support)
---
# 🔑 Vehicle Keys | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#installation-guide)
INSTALLATION GUIDE
-------------------------------------------------------------------------------------------------------------------------------
circle-check
The script has Backward Compatibility with qb-vehiclekeys and qbx\_vehiclekeys.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_vehiclekeys**arrow-up-right](https://portal.cfx.re/assets/granted-assets?page=1&sort=asset.updated_at&direction=asc)
from CFX Portal and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-1-adding-lock-pick-item)
Step 1 - Adding Lock Pick Item
circle-info
Navigate to the following file and paste our code.
**Overextended Inventory (QBox, ESX):**
`ox_inventory/data/items.lua`
Copy
['carlockpick'] = {
label = "Car Lockpick",
weight = 1000,
stack = true,
close = true,
description = "Perfect when you forget your keys... or have other plans",
client = {
image = "lockpick.png",
event = "is_vehiclekeys:useLockPick",
}
},
**QBCore:**
`qb-core/shared/items.lua`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-2-configure-resources)
Step 2 - Configure Resources
circle-info
You must read and configure the `config.lua` file in **is\_vehiclekeys** to meet your needs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-vehicle)
Adding Custom Vehicle
circle-info
UGo to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with the vehicle brand, model, and its logo.
* vehicle: `object`
* make?: `string`
* model?: `string`
* img?: `string("images/yourimg.png" or Direct URL)`
**Example**
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-key-for-vehicle-class)
Adding Key for Vehicle Class
circle-info
Go to `config.lua` and find `cfg.VehicleKeysType`, where you can set the key type for each vehicle class. The available key types are: `new_car`, `old_car`, `universal`, and `bike`.
**Example**
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-key)
Adding Custom Key
circle-info
Go to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with a specified key.
* keys: `string`
**Example**
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-settings-for-vehicle)
Adding Custom Settings for Vehicle
circle-info
Go to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with the specified data.
* settings: `object`
* alarm?: `object`
* enabled: `boolean`
* activeOnFailLockPick: `boolean`
* activeOnSuccessLockPick: `boolean`
* activeOnSearchingKeys: `boolean`
* activeOnHotwiring: `boolean`
* handlePull: `boolean`
* toggleLockDeactivate: `boolean`
* min: `number`
* max: `number`
* hotwiring?: `object`
* successChance: `number(0-100)`
* maxAttempts: `number`
* min: `number`
* max: `number`
* keysearching?: `object`
* successChance: `number(0-100)`
* rewardChance: `number(0-100)`
* rewards: `array of objects`
* item: `boolean`
* name: `string(item name or "cash"/"bank")`
* label?: `string`
* count: `object`
* min: `number`
* max: `number`
* min: `number`
* max: `number`
* lockpick?: `object`
* enabled: `boolean`
* keyBreakOnSuccess: `number(0-100)`
* keyBreakOnFail: `number(0-100)`
* minigame: `function`
* return: `boolean`
* anim\_lock?: `function`
* anim\_unlock?: `function`
**Example**
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-0-first-steps)
* [Step 1 - Adding Lock Pick Item](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-1-adding-lock-pick-item)
* [Step 2 - Configure Resources](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#step-2-configure-resources)
* [Adding Custom Vehicle](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-vehicle)
* [Adding Key for Vehicle Class](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-key-for-vehicle-class)
* [Adding Custom Key](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-key)
* [Adding Custom Settings for Vehicle](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys#adding-custom-settings-for-vehicle)
Copy
carlockpick = {name = "carlockpick", label = "Car Lockpick", weight = 1000, type = "item", image = "lockpick.png", unique = false, usable = true, shoudClose = true, description = "Perfect when you forget your keys... or have other plans"},
Copy
[GetHashKey("comet6")] = {
vehicle = {make = "Pfister", model = "Comet VI"},
},
[GetHashKey("bmx")] = {
vehicle = {make = "Subrosa", model = "BMX", img = "images/subrosa.png"},
},
[GetHashKey("police")] = {
vehicle = {make = "Vapid", img = "images/vapid.webp"},
},
Copy
cfg.VehicleKeysType = {
[0] = "old_car", -- Compacts
[1] = "new_car", -- Sedans
[2] = "new_car", -- SUVs
[3] = "old_car", -- Coupes
[4] = "old_car", -- Muscle
[5] = "old_car", -- Sports Classics
[6] = "new_car", -- Sports
[7] = "new_car", -- Super
[8] = "universal", -- Motorcycles
[9] = "old_car", -- Off-road
[10] = "universal", -- Industrial
[11] = "universal", -- Utility
[12] = "old_car", -- Vans
[13] = "bike", -- Cycles
[14] = "universal", -- Boats
[15] = "universal", -- Helicopters
[16] = "universal", -- Planes
[17] = "universal", -- Service
[18] = "old_car", -- Emergency
[19] = "universal", -- Military
[20] = "universal", -- Commercial
[21] = nil, -- Trains
[22] = "universal", -- Open Wheel
}
Copy
[GetHashKey("sadler2")] = {
keys = "old_car",
},
Copy
[GetHashKey("zentorno")] = {
settings = {
alarm = {
enabled = true,
activeOnFailLockPick = true,
activeOnSuccessLockPick = true,
activeOnSearchingKeys = true,
activeOnHotwiring = true,
handlePull = true,
toggleLockDeactivate = true,
min = 30000,
max = 60000,
},
hotwiring = {
successChance = 25, -- 0 - 100%
maxAttempts = 4,
min = 10000,
max = 20000,
},
keysearching = {
successChance = 10, -- 0 - 100%
rewardChance = 75, -- 0 - 100%
rewards = {
{item = true, name = "carlockpick", label = "Lock Pick", count = {min = 1, max = 2}},
{item = false, name = "cash", count = {min = 100, max = 1000}},
},
min = 10000,
max = 20000,
},
lockpick = {
enabled = true,
keyBreakOnSucces = 50, -- 0 - 100%
keyBreakOnFail = 75, -- 0 - 100%
minigame = function()
return lib.skillCheck("hard")
end,
},
anim_lock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 5000, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
hornAnim(veh, {
{duration = 200, gap = 0},
})
end,
anim_unlock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 2500, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
end,
},
},
---
# 🚗 Garage | inside-scripts
circle-exclamation
**Garages use a different database than those from the Framework**
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#installation-guide)
INSTALLATION GUIDE
-------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_garage**arrow-up-right](https://keymaster.fivem.net/)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-1-configure-resources)
Step 1 - Configure Resources
circle-info
You must read and configure the `config.lua` file in **is\_garage** to meet your needs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-2-import-sql)
Step 2 - Import SQL
circle-info
You can import the `is_garage.sql` file included with the received script or use the following command in the database
Copy
CREATE TABLE `is_garage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`owner` longtext,
`model` varchar(50),
`hash` bigint(20),
`vin` varchar(50),
`plate` varchar(25),
`status` longtext,
`parked` longtext,
`fuel` int(11),
`engine` int(11),
`body` int(11),
`distance` float(10,2),
`mods` longtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE `is_garage_codes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(100),
`code` varchar(100),
`package` int(11),
`count` int(11),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
CREATE TABLE `is_garage_keys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`identifier` varchar(100),
`name` varchar(100),
`vin` varchar(100),
`favorite` tinyint(1),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
ALTER TABLE `is_garage` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84;
ALTER TABLE `is_garage_codes` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
ALTER TABLE `is_garage_keys` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66;
COMMIT;
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-3-tebex-integration)
Step 3 - Tebex Integration
circle-info
Log in to your [**Tebex**arrow-up-right](https://www.tebex.io/)
account, go to your project, and then:
1. Open the **Integrations** tab and select **Game Servers**.
2. If you don't have a created Server, click **Connect Game Server** and choose the **PLUGIN** connection type. Then, you'll need to specify the **Server Name** and click **Select All** next to **Packages**.
3. If you have an existing Server, make sure it has the properties mentioned above.
4. Click **Edit** on Your Server and then click **Copy** in the **Secret Key** tab.
5. Then, in your server, go to `server.cfg` and insert this line, replacing **yourKey** with the copied key:
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-4-package-integration)
Step 4 - Package Integration
circle-info
Log in to your [**Tebex**arrow-up-right](https://www.tebex.io/)
account, go to your project, and then:
1. Go to the **Packages** tab and create your resource.
2. Once you've done that, go to the package you created.
3. The link to the page you are on should look like this: `https://creator.tebex.io/packages/0000000`, where the digits at the end of the link represent your package's ID - copy them.
4. In your server, go to `is_garage/config.lua` and create a new table in `cfg.Tebex.packages`. It should look like the following:
5. Now, anyone with the specified resource will be able to use it in the game by referencing the transaction, `tbx-xxxxxxxxx`.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-5-converting-vehicles)
Step 5 - Converting Vehicles
circle-info
To transfer your Vehicles from Old Garages, simply use the in-game command `convertVehicles` or the one set in `config.lua`, and then restart the script. After this, all vehicles from supported frameworks will be added to our Garage System.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-6-snippet-for-vehicle-shops)
Step 6 - Snippet for Vehicle Shops
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#qbcore)
QBCore
`qb-vehicleshop` -> `client.lua`
**Search**
**Replace to**
`qb-vehicleshop` -> `server.lua`
**Search**
**Replace to**
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#qbox)
QBox
circle-exclamation
Go to `qbx_vehicleshop/config/shared.lua` and set `finance.enable` to `false`
`qbx_vehicleshop` -> `server` -> `main.lua`
**Search**
**Replace to**
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-0-first-steps)
* [Step 1 - Configure Resources](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-1-configure-resources)
* [Step 2 - Import SQL](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-2-import-sql)
* [Step 3 - Tebex Integration](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-3-tebex-integration)
* [Step 4 - Package Integration](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-4-package-integration)
* [Step 5 - Converting Vehicles](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-5-converting-vehicles)
* [Step 6 - Snippet for Vehicle Shops](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage#step-6-snippet-for-vehicle-shops)
Copy
setr sv_tebexSecret yourKey
Copy
{id = 0, chars = 8}, -- id - Copied Package Id, chars - Maximum Characters in Plate
Copy
{
header = Lang:t('menus.freeuse_buy_header'),
txt = Lang:t('menus.freeuse_buy_txt'),
icon = 'fa-solid fa-hand-holding-dollar',
params = {
isServer = true,
event = 'qb-vehicleshop:server:buyShowroomVehicle',
args = {
buyVehicle = Config.Shops[insideShop]['ShowroomVehicles'][ClosestVehicle].chosenVehicle
}
}
},
{
header = Lang:t('menus.finance_header'),
txt = Lang:t('menus.freeuse_finance_txt'),
icon = 'fa-solid fa-coins',
params = {
event = 'qb-vehicleshop:client:openFinance',
args = {
price = getVehPrice(),
buyVehicle = Config.Shops[insideShop]['ShowroomVehicles'][ClosestVehicle].chosenVehicle
}
}
},
Copy
{
header = Lang:t('menus.freeuse_buy_header'),
txt = Lang:t('menus.freeuse_buy_txt'),
icon = 'fa-solid fa-hand-holding-dollar',
params = {
isServer = true,
event = 'qb-vehicleshop:server:buyShowroomVehicle',
args = {
buyVehicle = Config.Shops[insideShop]['ShowroomVehicles'][ClosestVehicle].chosenVehicle,
shop = insideShop,
}
}
},
-- {
-- header = Lang:t('menus.finance_header'),
-- txt = Lang:t('menus.freeuse_finance_txt'),
-- icon = 'fa-solid fa-coins',
-- params = {
-- event = 'qb-vehicleshop:client:openFinance',
-- args = {
-- price = getVehPrice(),
-- buyVehicle = Config.Shops[insideShop]['ShowroomVehicles'][ClosestVehicle].chosenVehicle
-- }
-- }
-- },
Copy
RegisterNetEvent('qb-vehicleshop:server:buyShowroomVehicle', function(vehicle)
local src = source
vehicle = vehicle.buyVehicle
local pData = QBCore.Functions.GetPlayer(src)
local cid = pData.PlayerData.citizenid
local cash = pData.PlayerData.money['cash']
local bank = pData.PlayerData.money['bank']
local vehiclePrice = QBCore.Shared.Vehicles[vehicle]['price']
local plate = GeneratePlate()
if cash > tonumber(vehiclePrice) then
MySQL.insert('INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, garage, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', {
pData.PlayerData.license,
cid,
vehicle,
GetHashKey(vehicle),
'{}',
plate,
'pillboxgarage',
0
})
TriggerClientEvent('QBCore:Notify', src, Lang:t('success.purchased'), 'success')
TriggerClientEvent('qb-vehicleshop:client:buyShowroomVehicle', src, vehicle, plate)
pData.Functions.RemoveMoney('cash', vehiclePrice, 'vehicle-bought-in-showroom')
elseif bank > tonumber(vehiclePrice) then
MySQL.insert('INSERT INTO player_vehicles (license, citizenid, vehicle, hash, mods, plate, garage, state) VALUES (?, ?, ?, ?, ?, ?, ?, ?)', {
pData.PlayerData.license,
cid,
vehicle,
GetHashKey(vehicle),
'{}',
plate,
'pillboxgarage',
0
})
TriggerClientEvent('QBCore:Notify', src, Lang:t('success.purchased'), 'success')
TriggerClientEvent('qb-vehicleshop:client:buyShowroomVehicle', src, vehicle, plate)
pData.Functions.RemoveMoney('bank', vehiclePrice, 'vehicle-bought-in-showroom')
else
TriggerClientEvent('QBCore:Notify', src, Lang:t('error.notenoughmoney'), 'error')
end
end)
Copy
RegisterNetEvent('qb-vehicleshop:server:buyShowroomVehicle', function(data)
local src = source
local vehicle = data.buyVehicle
local shop = data.shop
local vehiclePrice = QBCore.Shared.Vehicles[vehicle]['price']
local plate = GeneratePlate()
local pData = QBCore.Functions.GetPlayer(src)
local cash = pData.PlayerData.money['cash']
local bank = pData.PlayerData.money['bank']
if cash > tonumber(vehiclePrice) then
pData.Functions.RemoveMoney('cash', vehiclePrice, 'vehicle-bought-in-showroom')
elseif bank > tonumber(vehiclePrice) then
pData.Functions.RemoveMoney('bank', vehiclePrice, 'vehicle-bought-in-showroom')
else
TriggerClientEvent('QBCore:Notify', src, Lang:t('error.notenoughmoney'), 'error')
return
end
TriggerClientEvent('QBCore:Notify', src, Lang:t('success.purchased'), 'success')
TriggerEvent("is_garage:createVehicle", {
model = vehicle,
hash = GetHashKey(vehicle),
plate = plate,
parked = {
coords = Config.Shops[shop].VehicleSpawn,
street = Config.Shops[shop].ShopLabel,
},
}, src)
end)
Copy
RegisterNetEvent('qbx_vehicleshop:server:buyShowroomVehicle', function(vehicle)
local src = source
local shopId = GetShopZone(src)
local shop = sharedConfig.shops[shopId]
if not shop then return end
if not CheckVehicleList(vehicle, shopId) then
return exports.qbx_core:Notify(src, locale('error.notallowed'), 'error')
end
local coords = GetClearSpawnArea(shop.vehicleSpawns)
if not coords then
return exports.qbx_core:Notify(src, locale('error.no_clear_spawn'), 'error')
end
local player = exports.qbx_core:GetPlayer(src)
local vehiclePrice = COREVEHICLES[vehicle].price
if not RemoveMoney(src, vehiclePrice, 'vehicle-bought-in-showroom') then
return exports.qbx_core:Notify(src, locale('error.notenoughmoney'), 'error')
end
local vehicleId = exports.qbx_vehicles:CreatePlayerVehicle({
model = vehicle,
citizenid = player.PlayerData.citizenid,
})
exports.qbx_core:Notify(src, locale('success.purchased'), 'success')
SpawnVehicle(src, {
coords = coords,
vehicleId = vehicleId
})
end)
Copy
RegisterNetEvent('qbx_vehicleshop:server:buyShowroomVehicle', function(vehicle)
local src = source
local shopId = GetShopZone(src)
local shop = sharedConfig.shops[shopId]
if not shop then return end
if not CheckVehicleList(vehicle, shopId) then
return exports.qbx_core:Notify(src, locale('error.notallowed'), 'error')
end
local coords = GetClearSpawnArea(shop.vehicleSpawns)
if not coords then
return exports.qbx_core:Notify(src, locale('error.no_clear_spawn'), 'error')
end
local player = exports.qbx_core:GetPlayer(src)
local vehiclePrice = COREVEHICLES[vehicle].price
if not RemoveMoney(src, vehiclePrice, 'vehicle-bought-in-showroom') then
return exports.qbx_core:Notify(src, locale('error.notenoughmoney'), 'error')
end
TriggerEvent("is_garage:createVehicle", {
model = vehicle,
hash = GetHashKey(vehicle),
plate = qbx.generateRandomPlate(),
parked = {
coords = coords,
street = shop.blip.label,
},
}, src)
exports.qbx_core:Notify(src, locale('success.purchased'), 'success')
end)
---
# Config | inside-scripts
Copy
cfg = {}
-- default settings, do not delete this
cfg.Dialog = {
typeEffect = false,
typeEffectSpeed = 25,
allowSkip = true,
}
cfg.Camera = {
anim = {
male = {
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_male1"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_male2"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_male2"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_male3"},
},
female = {
{dict = "missfbi3_party_b", anim = "talk_inside_loop_female"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_female"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_female"},
{dict = "rcmnigel1cnmt_1c", anim = "price_tag"},
}
},
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
}
cfg.Chat = {
range = 10.0,
message = false,
answer = false,
color = {
answer = {0, 240, 190},
message = {0, 155, 255},
}
}
Last updated 1 year ago
---
# 🗯️ Dialog V2 | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#installation-guide)
INSTALLATION GUIDE
----------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_dialogv2**arrow-up-right](https://portal.cfx.re/assets/granted-assets)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You must read and configure the `config.lua` file in **is\_dialog** to meet your needs.
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#step-0-first-steps)
* [Step 1 - Configure Resource](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2#step-1-configure-resource)
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#notify)
Notify
-------------------------------------------------------------------------------------------------------------------------------
Client-Side
Server-Side
Copy
exports["is_ui"]:Notify(title, message, duration, style, icon)
Copy
TriggerClientEvent("is_ui:Notify", playerId, title, message, duration, style, icon)
* title: `string` or `nil`
* message: `string`
* duration: `number` or `nil`
* style: `string` or `table`
* icon: `string` or `nil`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#example-usage)
Example Usage
Client-Side
Server-Side
Copy
-- Example 1: Using Predefined Style
exports["is_ui"]:Notify("Test", "Lorem ipsum adipiscing elit.", 5000, "info")
-- Example 2: Using Predefined Style with Custom Icon
exports["is_ui"]:Notify("Test", "Lorem ipsum adipiscing elit.", 5000, "info", "fa-regular fa-thumbs-up")
-- Example 3: Using Custom Style
local style = {
icon = "fa-solid fa-sack-dollar",
primaryColor = "#FF425D",
backgroundIcon = { from = "#FC3955", to = "#861A20" },
sound = { play = true, type = "notifySound6", volume = 5 }
}
exports["is_ui"]:Notify("Test", "Lorem adipiscing elit.", 5000, style)
Copy
-- Example 1: Using Predefined Style
TriggerClientEvent("is_ui:Notify", source, "Test", "Lorem ipsum adipiscing elit.", 5000, "info")
-- Example 2: Using Predefined Style with Custom Icon
TriggerClientEvent("is_ui:Notify", source, "Test", "Lorem ipsum adipiscing elit.", 5000, "info", "fa-regular fa-thumbs-up")
-- Example 3: Using Custom Style
local style = {
icon = "fa-solid fa-sack-dollar",
primaryColor = "#FF425D",
backgroundIcon = { from = "#FC3955", to = "#861A20" },
sound = { play = true, type = "notifySound6", volume = 5 }
}
TriggerClientEvent("is_ui:Notify", "Test", "Lorem adipiscing elit.", 5000, style)
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#default-notifications)
Default Notifications
To quickly change default Notifications, go to the given file and replace the functions to call our export.
**QBCore**
`qb-core` -> `client` -> `functions.lua`
**ESX**
`es_extended` -> `client` -> `functions.lua`
**OX Library**
`ox_lib` -> `resource` -> `interface` -> `client` -> `notify.lua`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#progress-bar)
Progress Bar
-------------------------------------------------------------------------------------------------------------------------------------------
The Progress Bar can only be invoked on the Client-Side!
Activate
Cancel
Is Active
* data: `table`
* title: `string`
* icon: `string` or `nil`
* default: `fa-solid fa-user`
* duration: `number` or `nil`
* default: `5000`
* useWhileDead: `boolean` or `nil`
* default: `false`
* canCancel: `boolean` or `nil`
* default: `false`
* prop: `indexed table` or `nil`
* hash: `string`
* bone: `number` or `nil`
* default: `60309`
* position: `table`
* x: `number`
* default: `0.0`
* y: `number`
* default: `0.0`
* z: `number`
* default: `0.0`
* rotation: `table`
* x: `number`
* default: `0.0`
* y: `number`
* default: `0.0`
* z: `number`
* default: `0.0`
* animation: `table` or `nil`
* dict: `string`
* anim: `string`
* blendIn: `number` or `nil`
* `default: 3.0`
* blendOut: `number` or `nil`
* default: `3.0`
* duration: `number` or `nil`
* default: `-1`
* flag: `number` or `nil`
* default: `49`
* playbackRate: `number` or `nil`
* default: `0`
* lockX: `boolean` or `nil`
* default: `false`
* lockY: `boolean` or `nil`
* default: `false`
* lockZ: `boolean` or `nil`
* default: `false`
* scenario: `table` or `nil`
* name: `string`
* enterAnim: `boolean` or `nil`
* default: `true`
* disable: `table` or `nil`
* move: `boolean` or `nil`
* default: `false`
* car: `boolean` or `nil`
* default: `false`
* combat: `boolean` or `nil`
* default: `false`
* mouse: `boolean` or `nil`
* default: `false`
* sprint: `boolean` or `nil`
* default: `false`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#example-usage-1)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#default-progress-bar)
Default Progress Bar
To quickly change default Progress Bar, go to the given file and replace the functions to call our export.
**QBCore**
`qb-core` -> `client` -> `functions.lua`
**ESX**
`es_extended` -> `client` -> `functions.lua`
**OX Library**
`ox_lib` -> `resource` -> `interface` -> `client` -> `progress.lua`
Last updated 1 year ago
* [Notify](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#notify)
* [Example Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#example-usage)
* [Default Notifications](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#default-notifications)
* [Progress Bar](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#progress-bar)
* [Example Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#example-usage-1)
* [Default Progress Bar](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress/functions#default-progress-bar)
Copy
function QBCore.Functions.Notify(text, style, duration, icon, title)
local title = title or nil
local icon = icon or nil
if style == "primary" then style = "info" end
exports["is_ui"]:Notify(title, text, tonumber(duration), style, icon)
end
Copy
function ESX.ShowNotification(text, style, duration, title, icon)
exports["is_ui"]:Notify(title or nil, text or "Example Message", tonumber(duration), style or "info", icon or nil)
end
Copy
function lib.notify(data)
local title = data.title or nil
local message = data.description or nil
local duration = data.duration or nil
local style = data.type or nil
local icon = data.icon or nil
exports["is_ui"]:Notify(title, message, duration, style, icon)
end
Copy
exports["is_ui"]:ProgressBar(data)
Copy
exports["is_ui"]:cancelProgressBar()
Copy
exports["is_ui"]:IsProgressBarActive()
Copy
-- Example 1: Simple operation
local status = exports["is_ui"]:ProgressBar({
title = "Test",
icon = "fa-solid fa-user",
duration = 5000,
useWhileDead = false,
canCancel = false,
animation = {
dict = "amb@prop_human_movie_bulb@base",
anim = "base",
},
})
if status == true then
print("done")
elseif status == false then
print("cancel")
end
-- Example 2: Advanced operation
local status = exports["is_ui"]:ProgressBar({
title = "Test",
icon = "fa-solid fa-user",
duration = 5000,
useWhileDead = false,
canCancel = false,
prop = {
{
hash = "bkr_prop_weed_lrg_01b",
bone = 60309,
position = {x = 0.0, y = 0.0, z = 0.0},
rotation = {x = 0.0, y = 0.0, z = 0.0},
}
},
animation = {
dict = "amb@prop_human_movie_bulb@base",
anim = "base",
blendIn = 3.0,
blendOut = 3.0,
duration = -1,
flag = 0,
playbackRate = 0,
lockX = false,
lockY = false,
lockZ = false
},
-- scenario = {
-- name = "WORLD_HUMAN_PAPARAZZI",
-- enterAnim = true
-- },
disable = {
move = true,
car = true,
combat = true,
mouse = true,
sprint = true
},
})
if status == true then
print("function done")
elseif status == false then
print("function cancel")
end
Copy
function QBCore.Functions.Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel, icon)
if prop and prop.model then
prop[1] = {
hash = prop.model,
bone = prop.bone or nil,
position = prop.coords or nil,
rotation = prop.rotation or nil,
}
end
if animation and animation.task then
local scenario = {
name = animation.task,
enterAnim = true
}
animation = nil
elseif animation and animation.animDict and animation.anim then
animation = {
dict = animation.animDict,
anim = animation.anim,
blendIn = animation.blendIn,
blendOut = animation.blendOut,
duration = animation.duration,
flag = animation.flags,
playbackRate = animation.playbackRate,
lockX = animation.lockX,
lockY = animation.lockY,
lockZ = animation.lockZ
}
end
if type(disableControls) == "table" then
local disable = {
move = disableControls.disableMovement,
car = disableControls.disableCarMovement,
combat = disableControls.disableCombat,
mouse = disableControls.disableMouse,
sprint = disableControls.disableSprint
}
end
local status = exports["is_ui"]:ProgressBar({
title = label,
icon = icon,
duration = duration,
useWhileDead = useWhileDead,
canCancel = canCancel,
prop = prop,
animation = animation,
scenario = scenario,
disable = disable
})
if status == true then
if onFinish then
onFinish()
end
elseif status == false then
if onCancel then
onCancel()
end
end
end
Copy
function ESX.Progressbar(title, duration, Options)
if Options.prop and Options.prop.hash then
prop[1] = {
hash = Options.prop.hash,
bone = Options.prop.bone or nil,
position = Options.prop.position or nil,
rotation = Options.prop.rotation or nil,
}
end
if Options.animation and Options.animation.type == "Scenario" then
local scenario = {
name = Options.animation.Scenario,
enterAnim = Options.animation.enterAnim
}
elseif Options.animation and Options.animation.type == "anim" then
local animation = {
dict = Options.animation.dict,
anim = Options.animation.lib,
blendIn = Options.animation.blendIn,
blendOut = Options.animation.blendOut,
duration = Options.animation.duration,
flag = Options.animation.flag,
playbackRate = Options.animation.playbackRate,
lockX = Options.animation.lockX,
lockY = Options.animation.lockY,
lockZ = Options.animation.lockZ
}
end
if Options.disable and type(Options.disable) == "table" then
local disable = Options.disable
end
local status = exports["is_ui"]:ProgressBar({
title = title,
icon = Options.icon,
duration = duration,
useWhileDead = Options.useWhileDead,
canCancel = Options.canCancel,
prop = prop,
animation = animation,
scenario = scenario,
disable = disable
})
if status == true then
if Options.onFinish then
Options.onFinish()
end
elseif status == false then
if Options.onCancel then
Options.onCancel()
end
end
end
Copy
function lib.progressBar(data)
local prop, animation, scenario
if data.prop and data.prop[1] then
prop = {}
for _, v in ipairs(data.prop) do
table.insert(prop, {
hash = v.model,
bone = v.bone,
position = v.pos and {
x = v.pos.x,
y = v.pos.y,
z = v.pos.z,
} or {},
rotation = v.rot and {
x = v.rot.x,
y = v.rot.y,
z = v.rot.z,
} or {},
})
end
elseif data.prop and data.prop.model then
prop = {}
prop[1] = {
hash = data.prop.model,
bone = data.prop.bone,
position = data.prop.pos and {
x = data.prop.pos.x,
y = data.prop.pos.y,
z = data.prop.pos.z,
} or {},
rotation = data.prop.rot and {
x = data.prop.rot.x,
y = data.prop.rot.y,
z = data.prop.rot.z,
} or {},
}
end
if data.anim and data.anim.dict and data.anim.clip then
animation = {
dict = data.anim.dict,
anim = data.anim.clip,
blendIn = data.anim.blendIn,
blendOut = data.anim.blendOut,
duration = data.anim.duration,
flag = data.anim.flag,
playbackRate = data.anim.playbackRate,
lockX = data.anim.lockX,
lockY = data.anim.lockY,
lockZ = data.anim.lockZ,
}
elseif data.anim and data.scenario then
scenario = {
name = data.anim.scenario,
enterAnim = data.anim.playEnter,
}
end
local data = {
title = data.label,
icon = data.icon,
duration = data.duration,
useWhileDead = data.useWhileDead,
canCancel = data.canCancel,
prop = prop,
animation = animation,
scenario = scenario,
disable = data.disable,
}
return exports["is_ui"]:ProgressBar(data)
end
function lib.progressCircle(data)
return lib.progressBar(data)
end
function lib.cancelProgress()
exports["is_ui"]:cancelProgressBar()
end
function lib.progressActive()
return exports["is_ui"]:IsProgressBarActive()
end
---
# Config | inside-scripts
Copy
config = {}
config.keyToAccept = 'e' -- which key confirms lock picking
config.inventoryType = 'Configure' -- qbcore, esx, oxinventory
-- A function that checks the possession of an item and the taking of an item / Server side
config.doesPlayerHaveItem = function(source, itemName, amount)
if config.inventoryType == 'esx' then
while ESX == nil do
ESX = exports['es_extended']:getSharedObject()
Wait(5)
end
local xPlayer = ESX.GetPlayerFromId(source)
local itemCount = xPlayer.getInventoryItem(itemName).count
if itemCount ~= nil and itemCount >= amount then
xPlayer.removeInventoryItem(itemName, amount)
return true
end
return false
elseif config.inventoryType == 'qbcore' then
while QBCore == nil do
QBCore = exports['qb-core']:GetCoreObject()
Wait(5)
end
local player = QBCore.Functions.GetPlayer(source)
local totalAmount = 0
for _, item in ipairs(player.Functions.GetItemsByName(itemName)) do
totalAmount = totalAmount + item.amount
end
if totalAmount >= amount then
player.Functions.RemoveItem(itemName, amount)
return true
end
return false
elseif config.inventoryType == 'oxinventory' then
if exports.ox_inventory:GetItemCount(source, itemName) >= amount then
exports.ox_inventory:RemoveItem(source, itemName, amount)
return true
end
return false
else
print("Configure your inventoryType correctly in config.lua.")
return false
end
end
Last updated 2 years ago
---
# 🪛 Lock Picking | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#installation-guide)
INSTALLATION GUIDE
-------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#step-0-first-steps)
Step 0 - First Steps
circle-info
**1.** Download your resource from [FiveM's Keymasterarrow-up-right](https://keymaster.fivem.net/asset-grants)
**2.** Unzip the `inside-lockpicking` folder and place this folder in your server's resource folder. **3.** Add the resource to your server start config (server.cfg): **ensure inside-lockpicking** If you are using a framework, it must be placed anywhere below your framework resource e.g., es\_extended, not above.
ensure es\_extended ensure inside-lockpicking
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You **MUST** read all configurable options inside the`**[inside-lockpicking/config.lua]**` file and configure them to suit your server's needs.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#how-do-i-use-it)
How do i use it?
--------------------------------------------------------------------------------------------------------------------------
You can start the lock picking by using the default settings.
Copy
-- Initiates the lockpicking minigame and stores the result
local result = exports['inside-lockpicking']:StartLockPicking()
-- Checks the result of the minigame
if result == 'success' then
-- This section is executed if the player wins the minigame
print('Congratulations, you succeeded!')
elseif result == 'fail' then
-- This section is executed if the player loses the minigame
print('Unfortunately, you did not succeed this time.')
end
**Example 2**
Or you can use the start the lock picking by sending customized settings in a table.
triangle-exclamation
Remember to use item requirements, first configure config.lua correctly to check if the player has a given item.
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#step-0-first-steps)
* [Step 1 - Configure Resource](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#step-1-configure-resource)
* [How do i use it?](https://inside-scripts.gitbook.io/documentation/paid-scripts/lock-picking#how-do-i-use-it)
Copy
-- Table with settings
local settings = {
difficulty = 'hard', -- easy, medium, hard
requiredItem = 'lockpick', -- item name
requiredAmount = 1 -- quantity
}
-- Initiates the lockpicking minigame and stores the result
local result = exports['inside-lockpicking']:StartLockPicking(settings)
-- Checks the result of the minigame
if result == 'success' then
-- This section is executed if the player wins the minigame
print('Congratulations, you succeeded!')
elseif result == 'fail' then
-- This section is executed if the player loses the minigame
print('Unfortunately, you did not succeed this time.')
elseif result == 'no_item' then
-- If the player does not have a given number of items in the inventory
print('You need the required item to start this minigame.')
end
---
# 📰 Interaction | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#installation-guide)
INSTALLATION GUIDE
------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_interaction**arrow-up-right](https://keymaster.fivem.net/)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You must read and configure the `config.lua` file in **is\_interaction** to meet your needs.
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#step-0-first-steps)
* [Step 1 - Configure Resource](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction#step-1-configure-resource)
---
# 🖥️ Bridge & Library | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library#bridge)
Bridge
-------------------------------------------------------------------------------------------------------------
It is a resource that facilitates communication between different systems on the FiveM platform, such as [**Framework**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#framework)
, [**Inventory**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#inventory)
, [**Fuel**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#fuel)
, [**Keys**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#keys)
, [**Notifications**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#notifications)
, [**Progress Bars**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#progress-bar)
, and [**Target**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#target)
. It enables the integration and cooperation of these systems, eliminating the need for direct connections and simplifying script management, ensuring consistency and flexibility in project development.
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library#library)
Library
---------------------------------------------------------------------------------------------------------------
It is a resource independent of other systems on the FiveM platform, offering improvements and extensions to FiveM's native functions. This allows creators to build scripts more easily and efficiently by utilizing ready-made solutions.
Last updated 1 year ago
* [Bridge](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library#bridge)
* [Library](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library#library)
---
# 🪧Notifications and Progress | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#installation-guide)
INSTALLATION GUIDE
---------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_ui**arrow-up-right](https://keymaster.fivem.net/)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
circle-exclamation
If you are using version V2, import the provided .sql file into the database!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You must read and configure the `config.lua` file in **is\_ui** to meet your needs.
Last updated 1 year ago
* [INSTALLATION GUIDE](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#installation-guide)
* [Step 0 - First Steps](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#step-0-first-steps)
* [Step 1 - Configure Resource](https://inside-scripts.gitbook.io/documentation/paid-scripts/notifications-and-progress#step-1-configure-resource)
---
# Compatibility | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#framework)
Framework
---------------------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`qb-core`
**QBCore Framework**
`qbx_core`
**QBox Project**
`es_extended`
**ESX Framework**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#inventory)
Inventory
---------------------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`codem_inventory`
**CodeM**
`origen_inventory`
**ORIGEN Store**
`lj_inventory`
**loljoshie**
`ps-inventory`
**Project Sloth**
`qs-inventory`
**Quasar Store**
`qb-inventory`
**QBCore Framework**
`ox_inventory`
**Overextended**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#fuel)
Fuel
-----------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`LegacyFuel`
**InZidiuZ**
`cdn-fuel`
**CodineDev**
`ps-fuel`
**Project Sloth**
`okokGasStation`
**okok Scripts**
`ox_fuel`
**Overextended**
`lj-fuel`
**loljoshie**
`hyon_gas_station`
**HyonScript**
`ND_Fuel`
**ND Framework**
`myFuel`
**myScripts**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#keys)
Keys
-----------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`is_vehiclekeys`
**inside-scripts**
`qb-vehiclekeys`
**QBCore Framework**
`qs-vehiclekeys`
**Quasar Store**
`vehicles_keys`
**Jaksam Scripts**
`wasabi_carlock`
**Wasabi Scripts**
`cd_garage`
**Codesign\_**
`okokGarage`
**okok Scripts**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#notifications)
Notifications
-----------------------------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`is_ui`
**inside-scripts**
`ox_lib`
**Overextended**
`qb-core`
**QBCore Framework**
`esx_notify`
**ESX Framework**
`codem-notification`
**CodeM**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#progress-bar)
Progress Bar
---------------------------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`is_ui`
**inside-scripts**
`ox_lib`
**Overextended**
`progressbar`
**QBCore Framework**
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#target)
Target
---------------------------------------------------------------------------------------------------------------------------
Script Name
Creator
`is_interaction`
**inside-scripts**
`qb-target`
**QBCore Framework**
`ox_target`
**Overextended**
Last updated 10 months ago
* [Framework](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#framework)
* [Inventory](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#inventory)
* [Fuel](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#fuel)
* [Keys](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#keys)
* [Notifications](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#notifications)
* [Progress Bar](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#progress-bar)
* [Target](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#target)
---
# Functions | inside-scripts
copyCopychevron-down
[Bridgechevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge)
[Librarychevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library)
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#state-bags)
State Bags
-------------------------------------------------------------------------------------------------------------------------
* lightAnim: `true` - Light animation is in progress
* suspensionAnim: `true` - Suspension animation is in progress
* leavedKeys: `true` - The NPC left the keys in the vehicle
* cantFindKeys: `true` - Keys cannot be found in the vehicle
* wasHotwired: `true` - The wires have been connected in the vehicle
* alreadyJacked: `true` - The vehicle has been stolen
* engineEnabled: `true` - The engine was started by the remote ignition system
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#animations)
Animations
-------------------------------------------------------------------------------------------------------------------------
Lights
Suspension
Horn
Copy
lightAnim(vehicle, newLightsMultiplier, interiorLight, data)
* vehicle: `number`
* newLightsMultiplier: `float`
* interiorLight: `boolean`
* data: `array of objects`
* duration: `number`
* gap: `number`
* fadeIn: `boolean`
* fadeOut: `boolean`
Copy
suspensionAnim(vehicle, data)
* vehicle: `number`
* data: `array of objects`
* duration: `number`
* gap: `number`
* height: `float`
Copy
hornAnim(vehicle, data)
* vehicle: `number`
* data: `array of objects`
* duration: `number`
* gap: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#give-key)
Give Key
---------------------------------------------------------------------------------------------------------------------
Client-Side
Server-Side
* plate: `string`
* src: `number`
* plate: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#remove-key)
Remove Key
-------------------------------------------------------------------------------------------------------------------------
Client-Side
Server-Side
* plate: `string`
* src: `number`
* plate: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#has-keys)
Has Keys
---------------------------------------------------------------------------------------------------------------------
Client-Side
Server-Side
* plate: `string`
return: `boolean`
* src: `number`
* plate: `string`
return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#getting-script-type-key)
Getting Script Type Key
---------------------------------------------------------------------------------------------------------------------------------------------------
Client-Side
* vehicle: `number`
return: `string("new_car", "old_car", "universal", "bike")`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#setting-lock-state)
Setting Lock State
-----------------------------------------------------------------------------------------------------------------------------------------
Client-Side
Server-Side
* netId: `number`
* state: `number(1 = unlocked, 2 = locked)`
* vehicle: `number(netId or entity)`
* state: `number(1 = unlocked, 2 = locked)`
* isLocal: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#toggle-lock-in-nearest-vehicle)
Toggle Lock In Nearest Vehicle
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Client-Side
Last updated 1 year ago
* [State Bags](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#state-bags)
* [Animations](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#animations)
* [Give Key](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#give-key)
* [Remove Key](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#remove-key)
* [Has Keys](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#has-keys)
* [Getting Script Type Key](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#getting-script-type-key)
* [Setting Lock State](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#setting-lock-state)
* [Toggle Lock In Nearest Vehicle](https://inside-scripts.gitbook.io/documentation/paid-scripts/vehicle-keys/functions#toggle-lock-in-nearest-vehicle)
Copy
exports["is_vehiclekeys"]:GiveKey(plate)
Copy
exports["is_vehiclekeys"]:GiveKey(src, plate)
Copy
exports["is_vehiclekeys"]:RemoveKey(plate)
Copy
exports["is_vehiclekeys"]:RemoveKey(src, plate)
Copy
exports["is_vehiclekeys"]:HasKeys(plate)
Copy
exports["is_vehiclekeys"]:HasKeys(src, plate)
Copy
exports["is_vehiclekeys"]:getKeyForVehicle(vehicle)
Copy
TriggerServerEvent("is_vehiclekeys:setLockState", netId, state)
Copy
TriggerEvent("is_vehiclekeys:setLockState", vehicle, state, isLocal)
Copy
exports["is_vehiclekeys"]:toggleLockNearestVehicle()
---
# Config | inside-scripts
V1
V2
Copy
cfg = {}
-- Icons List https://fontawesome.com/search?o=r&m=free
cfg.ProgressBar = {
default = {
icon = "fa-solid fa-user",
useWhileDead = false,
canCancel = false,
disable = {
move = false,
car = false,
combat = false,
mouse = false,
sprint = false,
}
}
}
cfg.Notification = {
default = {
duration = 5000,
style = "info"
},
Position = "left-center",
-- left-top / left-center / left-down
-- top-left / top-center / top-right /
-- right-top / right-center / right-bottom
-- bottom-left / bottom-center / bottom-right
Style = {
["info"] = {
icon = "fa-solid fa-lightbulb",
primaryColor = "#0094E8",
backgroundIcon = { from = "#0094E8", to = "#0D447B" },
sound = { play = true, type = "notifySound6", volume = 5 }
},
["success"] = {
icon = "fa-regular fa-thumbs-up",
primaryColor = "#32DE84",
backgroundIcon = { from = "#32DE84", to = "#19B463" },
sound = { play = true, type = "notifySound6", volume = 5 }
},
["error"] = {
icon = "fa-regular fa-thumbs-down",
primaryColor = "#E62020",
backgroundIcon = { from = "#E62020", to = "#940909" },
sound = { play = true, type = "notifySound6", volume = 5 }
},
["money-income"] = {
icon = "fa-solid fa-sack-dollar",
primaryColor = "#3FD7AE",
backgroundIcon = { from = "#3FD7AE", to = "#2B9679" },
sound = { play = true, type = "notifySound6", volume = 5 }
},
["money-outcome"] = {
icon = "fa-solid fa-sack-dollar",
primaryColor = "#FF425D",
backgroundIcon = { from = "#FC3955", to = "#861A20" },
sound = { play = true, type = "notifySound6", volume = 5 }
},
}
}
Last updated 1 year ago
Copy
cfg = {}
-- Icons List: https://fontawesome.com/search?o=r&m=free
cfg.Command = {
name = "settings-ui",
}
cfg.ProgressBar = {
title = "Example Title",
duration = 5000,
icon = "fa-solid fa-user",
useWhileDead = false,
canCancel = false,
disable = {
move = false,
car = false,
combat = false,
mouse = false,
sprint = false,
},
prop = {
bone = 60309,
}
}
cfg.Notification = {
message = "Example Message",
duration = 5000,
style = "info",
icon = "fa-solid fa-user",
styles = {
["info"] = {
title = "Information",
icon = "fa-solid fa-circle-info",
color = "#007fff",
sound = "audio/notifySound1.mp3",
},
["warning"] = {
title = "Warning!",
icon = "fa-solid fa-circle-exclamation",
color = "#ffed4c",
sound = "audio/notifySound1.mp3",
},
["success"] = {
title = "Success",
icon = "fa-solid fa-square-check",
color = "#b2f22a",
sound = "audio/notifySound1.mp3",
},
["error"] = {
title = "Error",
icon = "fa-solid fa-square-xmark",
color = "#f84848",
sound = "audio/notifySound1.mp3",
},
},
}
-- left-top / left-center / left-down
-- top-left / top-center / top-right /
-- right-top / right-center / right-bottom
-- bottom-left / bottom-center / bottom-right
cfg.Settings = {
color = "#b2f22a",
progressBar = {
showTime = true,
position = "bottom-center",
variation = 1,
},
notification = {
sound = 20,
position = "left-center",
variation = 1,
}
}
---
# Usage & Installation | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation#installation-guide)
Installation Guide
------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Download [**is\_lib**arrow-up-right](https://github.com/inside-scripts/is_lib)
**,** [**is\_bridge**arrow-up-right](https://github.com/inside-scripts/is_bridge)
and [**ox\_lib**arrow-up-right](https://github.com/overextended/ox_lib)
, then upload these resources to your server.
2. Go to `is_lib/server/timezone.lua` and adjust your time zone.
3. Navigate to `server.cfg` and paste the following code above the resource start section:
Copy
# inside-scripts settings
setr is_bridge:language "en"
setr is_bridge:framework ""
setr is_bridge:inventory ""
setr is_bridge:fuel ""
setr is_bridge:keys ""
setr is_bridge:notification ""
setr is_bridge:progressbar ""
setr is_bridge:target ""
1. In the place of `""`, you should insert the script name exactly as it appears in [**Compatibility**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility)
.
2. The script startup order should be as follows:
Copy
ensure ox_lib
ensure is_lib
ensure our_standalone_scripts
ensure your_framework
ensure framework_additional_resources
ensure is_bridge
ensure our_framework_scripts
circle-info
If you skipped steps 3 and 4 or the resource you referenced in `server.cfg` was not found, **is\_bridge** will automatically search for the resource you are using.
circle-exclamation
For **is\_bridge** to function correctly and locate your resource, make sure it retains the original name set by the script's author
triangle-exclamation
The order must be maintained for the scripts to work correctly and to avoid errors. Starting scripts as a folder can also cause issues.
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation#usage)
Usage
----------------------------------------------------------------------------------------------------------------------------------
To use **is\_lib**, simply use our export in your script. It works on both the **Client** and **Server** side:
As for **is\_bridge**, just import it into your script in the `fxmanifest.lua` file:
One Shared Script
Multiple Shared Scripts
Last updated 10 months ago
* [Installation Guide](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation#installation-guide)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation#usage)
Copy
Lib = exports["is_lib"]:GetLibObject()
Copy
shared_script '@is_bridge/init.lua'
Copy
shared_scripts {
'@is_bridge/init.lua',
}
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#camera)
Camera
--------------------------------------------------------------------------------------------------------------
The Camera can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#creating-camera)
Creating Camera
Create
Copy
exports["is_dialog"]:createCamera(entity, data)
* entity: `entity(ped)`
* data: `table` or `nil`
* camera: `table` or `nil`
* position: `table` or `nil`
* x: `number` or `nil`
* y: `number` or `nil`
* z: `number` or `nil`
* offset: `table` or `nil`
* x: `number` or `nil`
* y: `number` or `nil`
* z: `number` or `nil`
* fov: `number` or `nil`
* ease: `boolean` or `nil`
* easeTime: `number` or `nil`
* animation: `table` or `nil`
* dict: `string`
* anim: `string`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#destroying-camera)
Destroying Camera
Destroy
* data: `table` or `nil`
* ease: `boolean` or `nil`
* easeTime: `number` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage-1)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#getting-camera-state)
Getting Camera State
Camera State
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage-2)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#dialog)
Dialog
--------------------------------------------------------------------------------------------------------------
The Dialog can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#creating-dialog)
Creating Dialog
Create
* data: `table` or `nil`
* audio: `table` or `nil`
* path: `string(audio/yourAudioFile.mp3)` or `nil`
* volume: `number` or `nil`
* title: `table` or `nil`
* text: `string` or `nil`
* background: `table` or `nil`
* primary: `string(hex)` or `nil`
* secondary: `string(hex)` or `nil`
* additional: `table` or `nil`
* text: `string` or `nil`
* icon: `string` or `nil`
* background: `table` or `nil`
* primary: `string(hex)` or `nil`
* secondary: `string(hex)` or `nil`
* message: `table` or `nil`
* text: `string` or `nil`
* typeEffect: `number` or `boolean` or `nil`
* buttons: `table` or `nil`
* button: `indexed table`
* input: `boolean`
* message: `string`
* type: `text` or `number`
* icon: `table` or `nil`
* name: `string` or `nil`
* color: `string(hex)` or `nil`
* onSelect: `function`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage-3)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#destroying-dialog)
Destroying Dialog
Destroy
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage-4)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#getting-dialog-state)
Getting Dialog State
Dialog State
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#example-usage-5)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#camera-and-dialog-usage)
Camera & Dialog Usage
----------------------------------------------------------------------------------------------------------------------------------------------
Last updated 1 year ago
* [Camera](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#camera)
* [Creating Camera](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#creating-camera)
* [Destroying Camera](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#destroying-camera)
* [Getting Camera State](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#getting-camera-state)
* [Dialog](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#dialog)
* [Creating Dialog](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#creating-dialog)
* [Destroying Dialog](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#destroying-dialog)
* [Getting Dialog State](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#getting-dialog-state)
* [Camera & Dialog Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1/functions#camera-and-dialog-usage)
Copy
-- Example 1: Simple Creating Camera with settings from config.lua
exports["is_dialog"]:createCamera(entity)
-- Example 2: Creating Camera
exports["is_dialog"]:createCamera(entity, {
camera = {
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
},
animation = {
dict = "missfbi3_party_d",
anim = "stand_talk_loop_a_male1",
},
})
Copy
exports["is_dialog"]:destroyCamera(data)
Copy
-- Example 1: Simple Destroying Camera with settings from config.lua
exports["is_dialog"]:destroyCamera()
-- Example 2: Destroying Camera
exports["is_dialog"]:destroyCamera({
ease = true,
easeTime = 1000,
})
Copy
exports["is_dialog"]:isCameraActive()
Copy
-- Example 1: Simple Getting Camera State
exports["is_dialog"]:isCameraActive()
Copy
exports["is_dialog"]:showDialog(data)
Copy
-- Example 1: Simple Creating Dialog with settings from config.lua
exports["is_dialog"]:showDialog()
-- Example 2: Creating Basic Dialog
exports["is_dialog"]:showDialog({
title = {
text = "Example Title",
},
message = {
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porttitor purus et posuere molestie.",
},
buttons = {
{
input = true,
message = "Provide Your Full Name",
type = "text",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = true,
message = "Provide Your Age",
type = "number",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = false,
message = "Test Button 1",
icon = {
name = "fa-solid fa-house",
color = "#ff425d",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 2",
icon = {
name = "fa-solid fa-house",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 3",
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
},
})
-- Example 3: Creating Advanced Dialog
exports["is_dialog"]:showDialog({
audio = {
path = "audio/example.mp3",
volume = 50,
},
title = {
text = "Example Title",
background = {
primary = "#00243a",
secondary = "#050f19",
},
},
additional = {
text = "Example Additional",
icon = "fa-solid fa-code",
background = {
primary = "#ff425d",
secondary = "#b7162b",
},
},
message = {
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porttitor purus et posuere molestie.",
typeEffect = 25,
},
buttons = {
{
input = true,
message = "Provide Your Full Name",
type = "text",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = true,
message = "Provide Your Age",
type = "number",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = false,
message = "Test Button 1",
icon = {
name = "fa-solid fa-house",
color = "#ff425d",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 2",
icon = {
name = "fa-solid fa-house",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 3",
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
},
})
Copy
exports["is_dialog"]:hideDialog()
Copy
-- Example 1: Simple Destroying Dialog
exports["is_dialog"]:hideDialog()
Copy
exports["is_dialog"]:isDialogActive()
Copy
-- Example 1: Simple Getting Dialog State
exports["is_dialog"]:isDialogActive()
Copy
-- Example 1: Simple Dialog & Camera code
exports["is_dialog"]:createCamera(entity)
exports["is_dialog"]:showDialog({
title = {
text = "Example Title",
},
message = {
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porttitor purus et posuere molestie.",
},
buttons = {
{
input = true,
message = "Provide Your Full Name",
type = "text",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = true,
message = "Provide Your Age",
type = "number",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = false,
message = "Test Button 1",
icon = {
name = "fa-solid fa-house",
color = "#ff425d",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 2",
icon = {
name = "fa-solid fa-house",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 3",
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
},
})
exports["is_dialog"]:destroyCamera()
-- Example 2: Advanced Dialog & Camera code
exports["is_dialog"]:createCamera(entity, {
camera = {
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
},
animation = {
dict = "missfbi3_party_d",
anim = "stand_talk_loop_a_male1",
},
})
exports["is_dialog"]:showDialog({
audio = {
path = "audio/example.mp3",
volume = 50,
},
title = {
text = "Example Title",
background = {
primary = "#00243a",
secondary = "#050f19",
},
},
additional = {
text = "Example Additional",
icon = "fa-solid fa-code",
background = {
primary = "#ff425d",
secondary = "#b7162b",
},
},
message = {
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porttitor purus et posuere molestie.",
typeEffect = 25,
},
buttons = {
{
input = true,
message = "Provide Your Full Name",
type = "text",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = true,
message = "Provide Your Age",
type = "number",
onSelect = function(id, input)
exports["is_dialog"]:hideDialog()
print(("Input: %s"):format(input))
end
},
{
input = false,
message = "Test Button 1",
icon = {
name = "fa-solid fa-house",
color = "#ff425d",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 2",
icon = {
name = "fa-solid fa-house",
},
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
{
input = false,
message = "Test Button 3",
onSelect = function(id)
exports["is_dialog"]:hideDialog()
print(("Button: %s"):format(id))
end
},
},
})
exports["is_dialog"]:destroyCamera({
ease = true,
easeTime = 1000,
})
---
# Config | inside-scripts
Copy
cfg = {}
cfg.Dialog = {
title = {
text = "Example Title",
background = {
primary = "#00243a",
secondary = "#050f19",
},
},
additional = {
text = "Example Additional",
background = {
primary = "#ff425d",
secondary = "#b7162b",
},
},
message = {
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse imperdiet enim vitae nibh ultricies, et laoreet libero ultricies. Vestibulum nec nisl sollicitudin, mattis augue eget, mollis sapien. Vivamus sed molestie arcu, at convallis augue.",
typeEffect = 25,
},
audio = {
path = "audio/example.mp3",
volume = 50,
},
buttons = {
{
input = true,
message = "Provide Your Full Name",
type = "text",
onSelect = function(id, input)
print(id, input)
end
},
{
input = true,
message = "Provide Your Age",
type = "number",
onSelect = function(id, input)
print(id, input)
end
},
{
input = false,
message = "Test Button 1",
icon = {
name = "fa-solid fa-house",
color = "#ff425d",
},
onSelect = function(id)
print(id)
end
},
{
input = false,
message = "Test Button 2",
icon = {
name = "fa-solid fa-house",
},
onSelect = function(id)
print(id)
end
},
{
input = false,
message = "Test Button 3",
onSelect = function(id)
print(id)
end
},
},
}
cfg.Camera = {
animation = {
male = {
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_male1"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_male2"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_male2"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_male3"},
},
female = {
{dict = "missfbi3_party_b", anim = "talk_inside_loop_female"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_b_female"},
{dict = "missfbi3_party_d", anim = "stand_talk_loop_a_female"},
{dict = "rcmnigel1cnmt_1c", anim = "price_tag"},
},
},
camera = {
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
},
}
Last updated 1 year ago
---
# Config | inside-scripts
Copy
Keys = {
['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57,
['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177,
['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18,
['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182,
['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81,
['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70,
['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DEL'] = 178,
['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['DOWN'] = 173,
}
cfg = {}
cfg.Debug = false
cfg.Interaction = {
default = {
hideSquare = false,
checkVisibility = false,
distance = 10.0,
distanceText = 1.0,
showInVehicle = false,
offset = {
text = {x = 0.0, y = 0.0, z = 0.2},
target = {x = 0.0, y = 0.0, z = 0.0}
},
duration = 1000,
key = "E",
icon = "fa-solid fa-user",
},
maximumDistance = 50.0,
keyScrollUp = "TOP",
keyScrollDown = "DOWN",
tick = {
checkNearbyEntities = 3000,
adjustEntities = 750,
updateCoordinates = 5,
drawInteraction = 3
}
}
Last updated 1 year ago
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#camera)
Camera
--------------------------------------------------------------------------------------------------------------
The Camera can only be invoked on the Client-Side!
Creating Camera
Destroying Camera
Getting Camera State
Copy
exports["is_dialogv2"]:createCamera(entity, data)
* entity: `entity(ped)`
* data(optional): `object`
* camera(optional): `object`
* position(optional): `object`
* x: `float`
* y: `float`
* z: `float`
* offset(optional): `object`
* x: `float`
* y: `float`
* z: `float`
* fov(optional): `float`
* ease(optional): `boolean`
* easeTime(optional): `number`
* animation(optional): `object`
* dict: `string`
* anim: `string`
**Example Usage**
* data(optional): `object`
* ease(optional): `boolean`
* easeTime(optional): `number`
**Example Usage**
return: `boolean`
**Example Usage**
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#dialog)
Dialog
--------------------------------------------------------------------------------------------------------------
The Dialog can only be invoked on the Client-Side!
Creating Dialog
Destroying Dialog
Getting Dialog State
* data: `object`
* typeEffect(optional): `boolean`
* typeEffectSpeed(optional): `number`
* allowSkip(optional): `boolean`
* title: string
* message: string
* chat(optional): `object`
* range(optional): `float`
* message(optional): `boolean`
* answer(optional): `boolean`
* audio(optional): `object`
* path: `string`
* volume(optional): `number(0-100)`
* tags(optional): `array`
* text: `string`
* color: `string(hex)`
* icon(optional): `string`
* buttons(optional): `array`
* type(optional): `string("button", "item", "number", "text")`
* text: `string`
* onSelect: `function(...)`
* canInteract: `function()`
* items(optional): array
* name: `string(item)`
* path: `string(image)`
**Example Usage**
**Example Usage**
return: `boolean`
**Example Usage**
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#camera-and-dialog-usage)
Camera & Dialog Usage
----------------------------------------------------------------------------------------------------------------------------------------------
Last updated 1 year ago
* [Camera](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#camera)
* [Dialog](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#dialog)
* [Camera & Dialog Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v2/functions#camera-and-dialog-usage)
Copy
-- Example 1
exports["is_dialogv2"]:createCamera(entity)
-- Example 2
exports["is_dialogv2"]:createCamera(entity, {
camera = {
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
},
animation = {
dict = "missfbi3_party_d",
anim = "stand_talk_loop_a_male1",
},
})
Copy
exports["is_dialogv2"]:destroyCamera(data)
Copy
-- Example 1
exports["is_dialogv2"]:destroyCamera()
-- Example 2
exports["is_dialogv2"]:destroyCamera({
ease = true,
easeTime = 1000,
})
Copy
exports["is_dialogv2"]:isCameraActive()
Copy
local cameraState = exports["is_dialogv2"]:isCameraActive()
if cameraState then
print("camera is active")
else
print("camera is not active")
end
Copy
exports["is_dialogv2"]:showDialog(data)
Copy
-- Example 1
exports["is_dialogv2"]:showDialog({
title = "Example Title",
message = "Example Message",
buttons = {
{text = "Example Button 1", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "button", text = "Example Button 2", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "number", text = "Your number...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "text", text = "Your text...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
},
})
-- Example 2
exports["is_dialogv2"]:showDialog({
typeEffect = true,
typeEffectSpeed = 15,
allowSkip = false,
title = "Example Title",
message = "Example Message",
tags = {
{text = "TAG1", color = "#009BFF"},
{text = "TAG2", color = "#FF425D", icon = "fa-solid fa-house"},
},
buttons = {
{text = "Example Button 1", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end, canInteract = function()
return true
end},
{type = "button", text = "Example Button 2", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end, canInteract = function()
return false
end},
{type = "number", text = "Your number...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "text", text = "Your text...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "item", text = "Choosed Item", onSelect = function(buttonIndex, item)
exports["is_dialogv2"]:hideDialog()
print(("Name: %s, Path: %s, Count: %s, Label: %s"):format(item.name, item.path, item.count, item.label))
end},
},
items = {
{name = "meth", path = "nui://qb-inventory/html/images/meth_baggy.png"},
{name = "weed_whitewidow", path = "https://as2.ftcdn.net/v2/jpg/02/16/71/15/1000_F_216711557_4b4flusrgydnwFabeeQMLlZo2Lr85Jw0.jpg"},
{name = "weed_skunk", path = "images/weed_baggy.png"},
},
})
-- Example 3
exports["is_dialogv2"]:showDialog({
typeEffect = true,
typeEffectSpeed = 15,
allowSkip = false,
title = "Example Title",
message = "Example Message",
chat = {
range = 5.0,
message = true,
answer = true,
},
audio = {
path = "audio/2pac.mp3",
volume = 75,
},
tags = {
{text = "TAG1", color = "#009BFF"},
{text = "TAG2", color = "#FF425D", icon = "fa-solid fa-house"},
},
buttons = {
{text = "Example Button 1", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end, canInteract = function()
return true
end},
{type = "button", text = "Example Button 2", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end, canInteract = function()
return false
end},
{type = "number", text = "Your number...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "text", text = "Your text...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "item", text = "Choosed Item", onSelect = function(buttonIndex, item)
exports["is_dialogv2"]:hideDialog()
print(("Name: %s, Path: %s, Count: %s, Label: %s"):format(item.name, item.path, item.count, item.label))
end},
},
items = {
{name = "meth", path = "nui://qb-inventory/html/images/meth_baggy.png"},
{name = "weed_whitewidow", path = "https://as2.ftcdn.net/v2/jpg/02/16/71/15/1000_F_216711557_4b4flusrgydnwFabeeQMLlZo2Lr85Jw0.jpg"},
{name = "weed_skunk", path = "images/weed_baggy.png"},
},
})
Copy
exports["is_dialogv2"]:hideDialog()
Copy
exports["is_dialogv2"]:hideDialog()
Copy
exports["is_dialogv2"]:isDialogActive()
Copy
local dialogState = exports["is_dialogv2"]:isDialogActive()
if dialogState then
print("dialog is active")
else
print("dialog is not active")
end
Copy
-- Example 1
exports["is_dialogv2"]:createCamera(entity)
exports["is_dialogv2"]:showDialog({
title = "Example Title",
message = "Example Message",
buttons = {
{text = "Example Button 1", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "button", text = "Example Button 2", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "number", text = "Your number...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "text", text = "Your text...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
},
})
exports["is_dialogv2"]:destroyCamera()
-- Example 2
exports["is_dialogv2"]:createCamera(entity, {
camera = {
position = {
x = 0.0,
y = 0.8,
z = 0.7,
},
offset = {
x = 0.0,
y = 0.0,
z = 0.5,
},
fov = 65.0,
ease = true,
easeTime = 1000,
},
animation = {
dict = "missfbi3_party_d",
anim = "stand_talk_loop_a_male1",
},
})
exports["is_dialogv2"]:showDialog({
typeEffect = true,
typeEffectSpeed = 15,
allowSkip = false,
title = "Example Title",
message = "Example Message",
chat = {
range = 5.0,
message = true,
answer = true,
},
audio = {
path = "audio/2pac.mp3",
volume = 75,
},
tags = {
{text = "TAG1", color = "#009BFF"},
{text = "TAG2", color = "#FF425D", icon = "fa-solid fa-house"},
},
buttons = {
{text = "Example Button 1", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "button", text = "Example Button 2", onSelect = function(buttonIndex)
exports["is_dialogv2"]:hideDialog()
print(("Button: %s"):format(buttonIndex))
end},
{type = "number", text = "Your number...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "text", text = "Your text...", onSelect = function(buttonIndex, value)
exports["is_dialogv2"]:hideDialog()
print(("Input: %s"):format(value))
end},
{type = "item", text = "Choosed Item", onSelect = function(buttonIndex, item)
exports["is_dialogv2"]:hideDialog()
print(("Name: %s, Path: %s, Count: %s, Label: %s"):format(item.name, item.path, item.count, item.label))
end},
},
items = {
{name = "meth", path = "nui://qb-inventory/html/images/meth_baggy.png"},
{name = "weed_whitewidow", path = "https://as2.ftcdn.net/v2/jpg/02/16/71/15/1000_F_216711557_4b4flusrgydnwFabeeQMLlZo2Lr85Jw0.jpg"},
{name = "weed_skunk", path = "images/weed_baggy.png"},
},
})
exports["is_dialogv2"]:destroyCamera({
ease = true,
easeTime = 1000,
})
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#create-vehicle)
Create Vehicle
---------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage)
Usage
Client-Side
Server-Side
Copy
TriggerEvent("is_garage:createVehicle", vehicle, data, owner)
* vehicle: `number`
* data: `object`
* parked(optional): `object`
* coords: `vector4`
* street: `string`
* plate(optional): `string`
* fuel(optional): `float`
* engine(optional): `number`
* body(optional): `number`
* distance(optional): `float`
* mods(optional): `object(`[`**ox_lib**`arrow-up-right](https://overextended.dev/ox_lib/Modules/VehicleProperties/Client#vehicle-properties)
`)`
* owner(optional): `number(playerId)` or `object`
* job: `string`
* minGrade: `number`
* identifier: `string`
* name: `string`
* data: `object`
* model: `string`
* hash: `number`
* plate: `string`
* parked: `object`
* coords: `vector4`
* street: `string`
* fuel(optional): `float`
* engine(optional): `number`
* body(optional): `number`
* distance(optional): `float`
* mods(optional): `object(`[`**ox_lib**`arrow-up-right](https://overextended.dev/ox_lib/Modules/VehicleProperties/Client#vehicle-properties)
`)`
* owner: `number(playerId)` or `object`
* job: `string`
* minGrade: `number`
* identifier: `string`
* name: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example)
Example
Client-Side
Server-Side
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#deleting-vehicle)
Deleting Vehicle
-------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-1)
Usage
Client-Side
Server-Side
* target: `string(vin)` or `number(netId)`
* target: `string(vin)` or `number(netId)`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-1)
Example
Client-Side
Server-Side
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#setting-distance)
Setting Distance
-------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-2)
Usage
Client-Side
Server-Side
* target: `string(vin)` or `number(netId)`
* distance: `float`
* target: `string(vin)` or `number(netId)`
* distance: `float`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-2)
Example
Client-Side
Server-Side
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-plate)
Get Vehicle By Plate
---------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-3)
Usage
Client-Side & Server-Side
* plate: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-3)
Example
Client-Side & Server-Side
* return: `object`
* owner: `object`
* job: `string`
* minGrade: `number`
* identifier: `string`
* name: `string`
* model: `string`
* hash: `number`
* vin: `string`
* plate: `string`
* status: `number` or `object`
* parked: `object`
* coords: `vector4`
* street: `string`
* fuel: `float`
* engine: `number`
* body: `number`
* distance: `float`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-net-id)
Get Vehicle By Net Id
-----------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-4)
Usage
Client-Side & Server-Side
* netId: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-4)
Example
Client-Side & Server-Side
* return: `object`
* owner: `object`
* job: `string`
* minGrade: `number`
* identifier: `string`
* name: `string`
* model: `string`
* hash: `number`
* vin: `string`
* plate: `string`
* status: `number` or `object`
* parked: `object`
* coords: `vector4`
* street: `string`
* fuel: `float`
* engine: `number`
* body: `number`
* distance: `float`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-vin)
Get Vehicle By Vin
-----------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-5)
Usage
Client-Side & Server-Side
* vin: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-5)
Example
Client-Side & Server-Side
* return: `object`
* owner: `object`
* job: `string`
* minGrade: `number`
* identifier: `string`
* name: `string`
* model: `string`
* hash: `number`
* vin: `string`
* plate: `string`
* status: `number` or `object`
* parked: `object`
* coords: `vector4`
* street: `string`
* fuel: `float`
* engine: `number`
* body: `number`
* distance: `float`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-player-keys)
Get Player Keys
-----------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-6)
Usage
Client-Side & Server-Side
* target: `string(identifier)` or `number(playerId)`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-6)
Example
Client-Side & Server-Side
* return: `array`
* vin: `string`
* favorite: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-player-vehicles)
Get Player Vehicles
-------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-7)
Usage
Client-Side & Server-Side
* target: `string(identifier)` or `number(playerId)`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-7)
Example
Client-Side & Server-Side
* return: `array`
* vin: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-distance)
Get Vehicle Distance
---------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-8)
Usage
Client-Side & Server-Side
* target: `string(vin)` or `number(netId)`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-8)
Example
Client-Side & Server-Side
* return: `float`
Last updated 1 year ago
* [Create Vehicle](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#create-vehicle)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example)
* [Deleting Vehicle](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#deleting-vehicle)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-1)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-1)
* [Setting Distance](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#setting-distance)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-2)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-2)
* [Get Vehicle By Plate](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-plate)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-3)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-3)
* [Get Vehicle By Net Id](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-net-id)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-4)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-4)
* [Get Vehicle By Vin](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-by-vin)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-5)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-5)
* [Get Player Keys](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-player-keys)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-6)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-6)
* [Get Player Vehicles](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-player-vehicles)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-7)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-7)
* [Get Vehicle Distance](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#get-vehicle-distance)
* [Usage](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#usage-8)
* [Example](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/functions#example-8)
Copy
TriggerEvent("is_garage:createVehicle", data, owner)
Copy
-- Adding Vehicle for Source
TriggerEvent("is_garage:createVehicle", vehicle, {})
-- Adding Vehicle for Specified Player Id
TriggerEvent("is_garage:createVehicle", vehicle, {}, playerId)
-- Adding Vehicle for Specified Player
TriggerEvent("is_garage:createVehicle", vehicle, {}, {
identifier = "char1:xxx/citizenid",
name = "Keyton Johnson",
})
-- Adding Vehicle for Specified Job
TriggerEvent("is_garage:createVehicle", vehicle, {}, {
job = "police",
minGrade = 2,
})
Copy
-- Adding Vehicle for Specified Player Id
TriggerEvent("is_garage:createVehicle", {
model = "sultanrs",
hash = GetHashKey("sultanrs"),
plate = "LS 420",
parked = {
coords = vector4(0.0, 0.0, 0.0, 0.0),
street = "Default Spawn",
},
}, playerId)
-- Adding Vehicle for Specified Player
TriggerEvent("is_garage:createVehicle", {
model = "sultanrs",
hash = GetHashKey("sultanrs"),
plate = "LS 420",
parked = {
coords = vector4(0.0, 0.0, 0.0, 0.0),
street = "Default Spawn",
},
}, {
identifier = "char1:xxx/citizenid",
name = "Keyton Johnson",
})
-- Adding Vehicle for Specified Job
TriggerEvent("is_garage:createVehicle", {
model = "sultanrs",
hash = GetHashKey("sultanrs"),
plate = "LS 420",
parked = {
coords = vector4(0.0, 0.0, 0.0, 0.0),
street = "Default Spawn",
},
}, {
job = "police",
minGrade = "2",
})
Copy
TriggerServerEvent("is_garage:deleteVehicle", target)
Copy
TriggerEvent("is_garage:deleteVehicle", target)
Copy
-- Deleting Vehicle with Specified VIN
TriggerServerEvent("is_garage:deleteVehicle", "VIN")
-- Deleting Vehicle with Specified Network ID
TriggerServerEvent("is_garage:deleteVehicle", netId)
Copy
-- Deleting Vehicle with Specified VIN
TriggerEvent("is_garage:deleteVehicle", "VIN")
-- Deleting Vehicle with Specified Network ID
TriggerEvent("is_garage:deleteVehicle", netId)
Copy
TriggerServerEvent("is_garage:setDistance", target, distance)
Copy
TriggerEvent("is_garage:setDistance", target, distance)
Copy
-- Setting Vehicle Distance with Specified VIN
TriggerServerEvent("is_garage:setDistance", "VIN", 150.25)
-- Setting Vehicle Distance with Specified Network ID
TriggerServerEvent("is_garage:setDistance", netId, 150.25)
Copy
-- Setting Vehicle Distance with Specified VIN
TriggerEvent("is_garage:setDistance", "VIN", 150.25)
-- Setting Vehicle Distance with Specified Network ID
TriggerEvent("is_garage:setDistance", netId, 150.25)
Copy
exports["is_garage"]:getVehicleByPlate(plate)
Copy
exports["is_garage"]:getVehicleByPlate(plate)
Copy
exports["is_garage"]:getVehicleByNetId(netId)
Copy
exports["is_garage"]:getVehicleByNetId(netId)
Copy
exports["is_garage"]:getVehicleByVin(vin)
Copy
exports["is_garage"]:getVehicleByVin(vin)
Copy
exports["is_garage"]:getPlayerKeys(target)
Copy
exports["is_garage"]:getPlayerKeys(target)
Copy
exports["is_garage"]:getPlayerVehicles(target)
Copy
exports["is_garage"]:getPlayerVehicles(target)
Copy
exports["is_garage"]:getVehicleDistance(target)
Copy
exports["is_garage"]:getVehicleDistance(target)
---
# Functions | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#local-entity)
Local Entity
----------------------------------------------------------------------------------------------------------------------------
The Interactions can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-local-entity)
Adding Local Entity
Interaction
Text
Copy
exports["is_interaction"]:addInteractionLocalEntity(name, entity, data)
Copy
exports["is_interaction"]:addTextLocalEntity(name, entity, data)
* name: `string`
* entity: `object`
* data: `table`
* hideSquare: `boolean` or `nil`
* checkVisibility: `boolean` or `nil`
* showInVehicle: `boolean` or `nil`
* distance: `number` or `nil`
* distanceText: `number` or `nil`
* offset: `table` or `nil`
* text: `table`
* x: `number`
* y: `number`
* z: `number`
* target: `table`
* x: `number`
* y: `number`
* z: `number`
* bone: `number` or `string` or `nil`
* options: `table`
* option: `indexed table`
* name: `string` or `nil`
* label: `string` or `nil`
* icon: `string` or `nil`
* key: `string` or `nil`
* duration: `number` or `nil`
* onSelect: `function` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-local-entity)
Removing Local Entity
Remove
* entity: `object`
* name: `string` or `nil`
* option: `name` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-1)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-local-entity)
Hiding/Showing Local Entity
Hiding
Showing
* entity: `object`
* name: `string` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-2)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#model)
Model
--------------------------------------------------------------------------------------------------------------
The Interactions can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-model)
Adding Model
Interaction
Text
* name: `string`
* model: `hash`
* data: `table`
* hideSquare: `boolean` or `nil`
* checkVisibility: `boolean` or `nil`
* showInVehicle: `boolean` or `nil`
* distance: `number` or `nil`
* distanceText: `number` or `nil`
* offset: `table` or `nil`
* text: `table`
* x: `number`
* y: `number`
* z: `number`
* target: `table`
* x: `number`
* y: `number`
* z: `number`
* bone: `number` or `string` or `nil`
* options: `table`
* option: `indexed table`
* name: `string` or `nil`
* label: `string` or `nil`
* icon: `string` or `nil`
* key: `string` or `nil`
* duration: `number` or `nil`
* onSelect: `function` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-3)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-model)
Removing Model
Remove
* model: `hash`
* name: `string` or `nil`
* option: `name` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-4)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-model)
Hiding/Showing Model
Hiding
Showing
* model: `hash`
* name: `string` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-5)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#global-entities)
Global Entities
----------------------------------------------------------------------------------------------------------------------------------
The Interactions can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-global-entities)
Adding Global Entities
Interaction
Text
* name: `string`
* select: `"vehicle"` or `"ped"` or `"player"`
* data: `table`
* hideSquare: `boolean` or `nil`
* checkVisibility: `boolean` or `nil`
* showInVehicle: `boolean` or `nil`
* distance: `number` or `nil`
* distanceText: `number` or `nil`
* offset: `table` or `nil`
* text: `table`
* x: `number`
* y: `number`
* z: `number`
* target: `table`
* x: `number`
* y: `number`
* z: `number`
* bone: `number` or `string` or `nil`
* ignoreModel: `indexed table`
* model: `hash`
* options: `table`
* option: `indexed table`
* name: `string` or `nil`
* label: `string` or `nil`
* icon: `string` or `nil`
* key: `string` or `nil`
* duration: `number` or `nil`
* onSelect: `function` or `nil`
**Example Usage**
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-global-entities)
Removing Global Entities
Remove
* select: `"vehicle"` or `"ped"` or `"player"`
* name: `string` or `nil`
* option: `name` or `nil`
**Example Usage**
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-global-entities)
Hiding/Showing Global Entities
Hiding
Showing
* select: `"vehicle"` or `"ped"` or `"player"`
* name: `string` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-6)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#coordinates)
Coordinates
--------------------------------------------------------------------------------------------------------------------------
The Interactions can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-coordinates)
Adding Coordinates
Interaction
Text
* name: `string`
* coords: `vector3`
* data: `table`
* hideSquare: `boolean` or `nil`
* checkVisibility: `boolean` or `nil`
* showInVehicle: `boolean` or `nil`
* distance: `number` or `nil`
* distanceText: `number` or `nil`
* offset: `table` or `nil`
* text: `table`
* x: `number`
* y: `number`
* z: `number`
* target: `table`
* x: `number`
* y: `number`
* z: `number`
* options: `table`
* option: `indexed table`
* name: `string` or `nil`
* label: `string` or `nil`
* icon: `string` or `nil`
* key: `string` or `nil`
* duration: `number` or `nil`
* onSelect: `function` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-7)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-coordinates)
Removing Coordinates
Remove
* coords: `vector3`
* name: `string` or `nil`
* option: `name` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-8)
Example Usage
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-coordinates)
Hiding/Showing Coordinates
Hiding
Showing
* coords: vector3
* name: `string` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-9)
Example Usage
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#misc)
Misc
------------------------------------------------------------------------------------------------------------
The Interactions can only be invoked on the Client-Side!
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-interactions-created-by-resource)
Removing Interactions Created By Resource
Remove
* resource: `string` or `nil`
####
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#example-usage-10)
Example Usage
Last updated 1 year ago
* [Local Entity](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#local-entity)
* [Adding Local Entity](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-local-entity)
* [Removing Local Entity](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-local-entity)
* [Hiding/Showing Local Entity](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-local-entity)
* [Model](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#model)
* [Adding Model](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-model)
* [Removing Model](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-model)
* [Hiding/Showing Model](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-model)
* [Global Entities](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#global-entities)
* [Adding Global Entities](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-global-entities)
* [Removing Global Entities](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-global-entities)
* [Hiding/Showing Global Entities](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-global-entities)
* [Coordinates](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#coordinates)
* [Adding Coordinates](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#adding-coordinates)
* [Removing Coordinates](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-coordinates)
* [Hiding/Showing Coordinates](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#hiding-showing-coordinates)
* [Misc](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#misc)
* [Removing Interactions Created By Resource](https://inside-scripts.gitbook.io/documentation/paid-scripts/interaction/functions#removing-interactions-created-by-resource)
Copy
-- Example 1: Using Interaction
exports["is_interaction"]:addInteractionLocalEntity("testInteraction", entity, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
key = "E",
duration = 500,
onSelect = function()
print("option1 working")
end
},
}
})
-- Example 2: Using Text
exports["is_interaction"]:addTextLocalEntity("testText", entity, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
},
}
})
Copy
exports["is_interaction"]:removeLocalEntity(entity, name, option)
Copy
-- Example 1: Removing All Interactions
exports["is_interaction"]:removeLocalEntity(entity)
-- Example 2: Removing provided Interaction
exports["is_interaction"]:removeLocalEntity(entity, "testText")
-- Example 3: Removing provided Interaction Option
exports["is_interaction"]:removeLocalEntity(entity, "testText", "option1")
Copy
exports["is_interaction"]:hideLocalEntity(entity, name)
Copy
exports["is_interaction"]:showLocalEntity(entity, name)
Copy
-- Example 1: Hiding All Interactions for specified Local Entity
exports["is_interaction"]:hideLocalEntity(entity)
-- Example 2: Hiding Interaction for specified Local Entity
exports["is_interaction"]:hideLocalEntity(entity, "testText")
-- Example 3: Showing All Interactions for specified Local Entity
exports["is_interaction"]:showLocalEntity(entity)
-- Example 4: Showing Interaction for specified Local Entity
exports["is_interaction"]:showLocalEntity(entity, "testText")
Copy
exports["is_interaction"]:addInteractionModel(name, model, data)
Copy
exports["is_interaction"]:addTextModel(name, model, data)
Copy
-- Example 1: Using Interaction
exports["is_interaction"]:addInteractionModel("testInteraction", model, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
key = "E",
duration = 500,
onSelect = function(entity)
print("found "..entity)
end
},
}
})
-- Example 2: Using Text
exports["is_interaction"]:addTextModel("testText", model, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
},
}
})
Copy
exports["is_interaction"]:removeModel(model, name, option)
Copy
-- Example 1: Removing All Interactions
exports["is_interaction"]:removeModel(model)
-- Example 2: Removing provided Interaction
exports["is_interaction"]:removeModel(model, "testText")
-- Example 3: Removing provided Interaction Option
exports["is_interaction"]:removeModel(model, "testText", "option1")
Copy
exports["is_interaction"]:hideModel(model, name)
Copy
exports["is_interaction"]:showModel(model, name)
Copy
-- Example 1: Hiding All Interactions for specified Model
exports["is_interaction"]:hideModel(model)
-- Example 2: Hiding Interaction for specified Model
exports["is_interaction"]:hideModel(model, "testText")
-- Example 3: Showing All Interactions for specified Model
exports["is_interaction"]:showModel(model)
-- Example 4: Showing Interaction for specified Model
exports["is_interaction"]:showModel(model, "testText")
Copy
exports["is_interaction"]:addInteractionGlobal(name, select, data)
Copy
exports["is_interaction"]:addTextGlobal(name, select, data)
Copy
-- Example 1: Using Interaction
exports["is_interaction"]:addInteractionGlobal("testInteraction", "vehicle", {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
ignoreModel = {-295689028},
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
key = "E",
duration = 500,
onSelect = function(entity)
print("found "..entity)
end
},
}
})
-- Example 2: Using Text
exports["is_interaction"]:addTextGlobal("testText", "vehicle", {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
bone = nil,
ignoreModel = {-295689028},
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
},
}
})
Copy
exports["is_interaction"]:removeGlobal(select, name, option)
Copy
-- Example 1: Removing All Interactions
exports["is_interaction"]:removeGlobal(select)
-- Example 2: Removing provided Interaction
exports["is_interaction"]:removeGlobal(select, "testText")
-- Example 3: Removing provided Interaction Option
exports["is_interaction"]:removeGlobal(select, "testText", "option1")
Copy
exports["is_interaction"]:hideGlobal(select, name)
Copy
exports["is_interaction"]:showGlobal(select, name)
Copy
-- Example 1: Hiding All Interactions for specified Global Entities
exports["is_interaction"]:hideGlobal(select)
-- Example 2: Hiding Interaction for specified Global Entities
exports["is_interaction"]:hideGlobal(select, "testText")
-- Example 3: Showing All Interactions for specified Global Entities
exports["is_interaction"]:showGlobal(select)
-- Example 4: Showing Interaction for specified Global Entities
exports["is_interaction"]:showGlobal(select, "testText")
Copy
exports["is_interaction"]:addInteractionCoords(name, coords, data)
Copy
exports["is_interaction"]:addTextCoords(name, coords, data)
Copy
-- Example 1: Using Interaction
exports["is_interaction"]:addInteractionCoords("testInteraction", coords, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
key = "E",
duration = 500,
onSelect = function()
print("option1 working")
end
},
}
})
-- Example 2: Using Text
exports["is_interaction"]:addTextCoords("testText", coords, {
hideSquare = false,
checkVisibility = true,
showInVehicle = false,
distance = 5.0,
distanceText = 1.0,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0}
},
options = {
{
name = "option1",
label = "Example Text",
icon = nil,
},
}
})
Copy
exports["is_interaction"]:removeCoords(coords, name, option)
Copy
-- Example 1: Removing All Interactions
exports["is_interaction"]:removeCoords(coords)
-- Example 2: Removing provided Interaction
exports["is_interaction"]:removeCoords(coords, "testText")
-- Example 3: Removing provided Interaction Option
exports["is_interaction"]:removeCoords(coords, "testText", "option1")
Copy
exports["is_interaction"]:hideCoords(coords, name)
Copy
exports["is_interaction"]:showCoords(coords, name)
Copy
-- Example 1: Hiding All Interactions at specified Coordinates
exports["is_interaction"]:hideCoords(coords)
-- Example 2: Hiding Interaction at specified Coordinates
exports["is_interaction"]:hideCoords(coords, "testText")
-- Example 3: Showing All Interactions at specified Coordinates
exports["is_interaction"]:showCoords(coords)
-- Example 4: Showing Interaction at specified Coordinates
exports["is_interaction"]:showCoords(coords, "testText")
Copy
exports["is_interaction"]:removeResource(resource)
Copy
-- Example 1: Removing Interactions in specified resource
exports["is_interaction"]:removeResource("qb-shops")
-- Example 2: Removing Interactions in current resource
exports["is_interaction"]:removeResource()
---
# Config | inside-scripts
Copy
cfg = {}
cfg.KeyBinds = { -- https://overextended.dev/ox_lib/Modules/AddKeybind/Client#ckeybind-class
mode = {
description = "Vehicle Keys Mode",
defaultKey = "CAPITAL",
defaultMapper = "KEYBOARD",
secondaryKey = nil,
secondaryMapper = nil,
},
toggleLock = {
description = "Toggle Vehicle Lock In Nearest Vehicle",
defaultKey = "L",
defaultMapper = "KEYBOARD",
secondaryKey = nil,
secondaryMapper = nil,
},
}
cfg.Mode = { -- Controls using [Scroll Up | Right Arrow], [Scroll Down | Left Arrow], [Left Mouse Button | Enter], [Right Mouse Button | Backspace]
optionDuration = 5.0,
showStatusWithoutKeys = false, -- true - without keys, we can see if the car is unlocked, locked, or stealable | false - we can only see this when we have keys
disableControls = {80, 81, 25, 68},
outline = {
enabled = false,
type = 0, -- 0, 1, 2
notlocked = {r = 0, g = 240, b = 190, a = 100},
locked = {r = 255, g = 66, b = 93, a = 100},
nokeys = {r = 52, g = 206, b = 255, a = 100},
},
}
cfg.Keys = {
["bike"] = {
range = 2.0,
sound = {
src = "bike_lock.mp3",
volume = 50,
},
settings = {
lockpick = {
enabled = true,
keyBreakOnSucces = 10, -- 0 - 100%
keyBreakOnFail = 25, -- 0 - 100%
minigame = function()
return lib.skillCheck("easy")
end,
},
}
},
["universal"] = {
range = 20.0,
sound = {
src = "universal_lock.mp3",
volume = 75,
},
settings = {
alarm = {
enabled = true,
activeOnFailLockPick = true,
activeOnSuccessLockPick = false,
activeOnSearchingKeys = false,
activeOnHotwiring = true,
handlePull = true,
toggleLockDeactivate = true,
min = 15000,
max = 30000,
},
hotwiring = {
successChance = 50, -- 0 - 100%
maxAttempts = 2,
min = 10000,
max = 20000,
},
keysearching = {
successChance = 25, -- 0 - 100%
rewardChance = 50, -- 0 - 100%
rewards = {
{item = true, name = "carlockpick", label = "Lock Pick", count = {min = 1, max = 2}},
{item = false, name = "cash", count = {min = 100, max = 1000}},
},
min = 10000,
max = 20000,
},
lockpick = {
enabled = true,
keyBreakOnSucces = 25, -- 0 - 100%
keyBreakOnFail = 50, -- 0 - 100%
minigame = function()
return lib.skillCheck("medium")
end,
},
anim_lock = function(veh)
lightAnim(veh, 0.1, false, {
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 1250, gap = 40, fadeIn = false, fadeOut = false},
})
hornAnim(veh, {
{duration = 100, gap = 0},
})
end,
anim_unlock = function(veh)
lightAnim(veh, 0.1, false, {
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 100, gap = 40, fadeIn = false, fadeOut = false},
{duration = 1250, gap = 40, fadeIn = false, fadeOut = false},
})
end,
}
},
["old_car"] = {
range = 15.0,
sound = {
src = "old_car_lock.mp3",
volume = 40,
},
settings = {
alarm = {
enabled = true,
activeOnFailLockPick = true,
activeOnSuccessLockPick = false,
activeOnSearchingKeys = false,
activeOnHotwiring = true,
handlePull = true,
toggleLockDeactivate = true,
min = 15000,
max = 30000,
},
hotwiring = {
successChance = 50, -- 0 - 100%
maxAttempts = 2,
min = 10000,
max = 20000,
},
keysearching = {
successChance = 25, -- 0 - 100%
rewardChance = 50, -- 0 - 100%
rewards = {
{item = true, name = "carlockpick", label = "Lock Pick", count = {min = 1, max = 2}},
{item = false, name = "cash", count = {min = 100, max = 1000}},
},
min = 10000,
max = 20000,
},
lockpick = {
enabled = true,
keyBreakOnSucces = 25, -- 0 - 100%
keyBreakOnFail = 50, -- 0 - 100%
minigame = function()
return lib.skillCheck("medium")
end,
},
anim_lock = function(veh)
lightAnim(veh, 0.35, false, {
{duration = 100, gap = 50, fadeIn = false, fadeOut = false},
{duration = 100, gap = 50, fadeIn = false, fadeOut = false},
{duration = 2500, gap = 50, fadeIn = false, fadeOut = true},
})
hornAnim(veh, {
{duration = 200, gap = 25},
{duration = 200, gap = 25},
})
end,
anim_unlock = function(veh)
lightAnim(veh, 0.35, false, {
{duration = 100, gap = 50, fadeIn = false, fadeOut = false},
{duration = 100, gap = 50, fadeIn = false, fadeOut = false},
{duration = 100, gap = 50, fadeIn = false, fadeOut = false},
{duration = 2500, gap = 50, fadeIn = false, fadeOut = true},
})
end,
}
},
["new_car"] = {
range = 30.0,
sound = {
src = "new_car_lock.mp3",
volume = 30,
},
settings = {
alarm = {
enabled = true,
activeOnFailLockPick = true,
activeOnSuccessLockPick = true,
activeOnSearchingKeys = true,
activeOnHotwiring = true,
handlePull = true,
toggleLockDeactivate = true,
min = 30000,
max = 60000,
},
hotwiring = {
successChance = 25, -- 0 - 100%
maxAttempts = 4,
min = 10000,
max = 20000,
},
keysearching = {
successChance = 10, -- 0 - 100%
rewardChance = 75, -- 0 - 100%
rewards = {
{item = true, name = "carlockpick", label = "Lock Pick", count = {min = 1, max = 2}},
{item = false, name = "cash", count = {min = 100, max = 1000}},
},
min = 10000,
max = 20000,
},
lockpick = {
enabled = true,
keyBreakOnSucces = 50, -- 0 - 100%
keyBreakOnFail = 75, -- 0 - 100%
minigame = function()
return lib.skillCheck("hard")
end,
},
anim_lock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 5000, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
hornAnim(veh, {
{duration = 200, gap = 0},
})
end,
anim_unlock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 2500, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
end,
}
},
}
cfg.CarJack = {
notLockedVehicleChance = 100, -- 0 - 100%
withGun = {
chanceToLeaveKeys = 50, -- 0 - 100%
cooldownBeetwenJacking = 30000,
fromVehicle = true,
range = 20.0,
weaponTypesChance = {
[2685387236] = 0, -- MELEE | 0 - 100%
[1548507267] = 0, -- THROWABLE | 0 - 100%
[4257178988] = 0, -- MISC | 0 - 100%
[416676503] = 50, -- HANDGUN | 0 - 100%
[-957766203] = 75, -- SMG | 0 - 100%
[860033945] = 90, -- SHOTGUN | 0 - 100%
[970310034] = 90, -- RIFLE | 0 - 100%
[1159398588] = 90, -- LMG | 0 - 100%
[3082541095] = 90, -- SNIPER | 0 - 100%
[2725924767] = 90, -- HEAVY | 0 - 100%
},
blockWeapons = {
GetHashKey("WEAPON_UNARMED"),
},
},
noGun = {
chanceToLeaveKeys = 50, -- 0 - 100%
attackChance = 50, -- 0 - 100%
weaponChance = 50, -- 0 - 100%
gangMemberAlwaysAttack = true,
gangMemberAlwaysWeapon = true,
pedWeaponAccuracy = { -- 0 - 100%
min = 85,
max = 100,
},
pedWeapons = {
GetHashKey("WEAPON_SWITCHBLADE"),
GetHashKey("WEAPON_BATTLEAXE"),
GetHashKey("WEAPON_BAT"),
GetHashKey("WEAPON_MACHETE"),
GetHashKey("WEAPON_COMBATPISTOL"),
GetHashKey("WEAPON_PISTOL50"),
GetHashKey("WEAPON_HEAVYPISTOL"),
},
},
}
cfg.ConfiscateVehicleJobs = {"police", "ems"}
cfg.SharedVehicles = {
[GetHashKey("police")] = "police",
[GetHashKey("police2")] = "police",
[GetHashKey("police3")] = "police",
[GetHashKey("policeb")] = "police",
[GetHashKey("policet")] = "police",
[GetHashKey("ambulance")] = "ems",
}
cfg.Dispatch = {
handlePull = function(ped, pedCoords, vehicle, vehicleCoords)
end,
searchingkeys = function(ped, pedCoords, vehicle, vehicleCoords)
end,
hotwiring = function(ped, pedCoords, vehicle, vehicleCoords)
end,
lockpick = function(ped, pedCoords, vehicle, vehicleCoords)
end,
carJackNoGun = function(ped, pedCoords, vehicle, vehicleCoords)
end,
carJackGun = function(ped, pedCoords, vehicle, vehicleCoords)
end,
}
cfg.Custom = {
[GetHashKey("comet6")] = {
vehicle = {make = "Pfister", model = "Comet VI"}
},
[GetHashKey("bmx")] = {
vehicle = {make = "Subrosa", model = "BMX", img = "images/subrosa.png"}
},
[GetHashKey("police")] = {
vehicle = {make = "Vapid", img = "images/vapid.webp"}
},
[GetHashKey("issi2")] = {
keys = "new_car"
},
[GetHashKey("brioso")] = {
keys = "new_car"
},
[GetHashKey("felon2")] = {
keys = "new_car"
},
[GetHashKey("zion")] = {
keys = "new_car"
},
[GetHashKey("zion2")] = {
keys = "new_car"
},
[GetHashKey("windsor2")] = {
keys = "new_car"
},
[GetHashKey("oracle2")] = {
keys = "new_car"
},
[GetHashKey("felon")] = {
keys = "new_car"
},
[GetHashKey("windsor")] = {
keys = "new_car"
},
[GetHashKey("sentinel")] = {
keys = "new_car"
},
[GetHashKey("exemplar")] = {
keys = "new_car"
},
[GetHashKey("jackal")] = {
keys = "new_car"
},
[GetHashKey("sentinel2")] = {
keys = "new_car"
},
[GetHashKey("policeb")] = {
keys = "universal"
},
[GetHashKey("riot2")] = {
keys = "universal"
},
[GetHashKey("pbus")] = {
keys = "universal"
},
[GetHashKey("firetruk")] = {
keys = "universal"
},
[GetHashKey("RIOT")] = {
keys = "universal"
},
[GetHashKey("AMBULANCE")] = {
keys = "universal"
},
[GetHashKey("guardian")] = {
keys = "old_car"
},
[GetHashKey("BARRACKS3")] = {
keys = "old_car"
},
[GetHashKey("BARRACKS")] = {
keys = "old_car"
},
[GetHashKey("vetir")] = {
keys = "old_car"
},
[GetHashKey("CRUSADER")] = {
keys = "old_car"
},
[GetHashKey("Gauntlet")] = {
keys = "new_car"
},
[GetHashKey("buffalo5")] = {
keys = "new_car"
},
[GetHashKey("dominator9")] = {
keys = "new_car"
},
[GetHashKey("dominator2")] = {
keys = "new_car"
},
[GetHashKey("vigero3")] = {
keys = "new_car"
},
[GetHashKey("Dominator")] = {
keys = "new_car"
},
[GetHashKey("dominator5")] = {
keys = "universal"
},
[GetHashKey("buffalo4")] = {
keys = "new_car"
},
[GetHashKey("dominator3")] = {
keys = "new_car"
},
[GetHashKey("gauntlet4")] = {
keys = "new_car"
},
[GetHashKey("vigero2")] = {
keys = "new_car"
},
[GetHashKey("ruiner4")] = {
keys = "new_car"
},
[GetHashKey("dune2")] = {
keys = "universal"
},
[GetHashKey("verus")] = {
keys = "universal"
},
[GetHashKey("brutus2")] = {
keys = "universal"
},
[GetHashKey("dune5")] = {
keys = "universal"
},
[GetHashKey("dune")] = {
keys = "universal"
},
[GetHashKey("rcbandito")] = {
keys = "universal"
},
[GetHashKey("monster3")] = {
keys = "universal"
},
[GetHashKey("dloader")] = {
keys = "universal"
},
[GetHashKey("monster")] = {
keys = "universal"
},
[GetHashKey("menacer")] = {
keys = "universal"
},
[GetHashKey("marshall")] = {
keys = "universal"
},
[GetHashKey("blazer3")] = {
keys = "universal"
},
[GetHashKey("bruiser2")] = {
keys = "universal"
},
[GetHashKey("dune4")] = {
keys = "universal"
},
[GetHashKey("ratel")] = {
keys = "universal"
},
[GetHashKey("blazer4")] = {
keys = "universal"
},
[GetHashKey("brutus3")] = {
keys = "universal"
},
[GetHashKey("dune3")] = {
keys = "universal"
},
[GetHashKey("brutus")] = {
keys = "universal"
},
[GetHashKey("BfInjection")] = {
keys = "universal"
},
[GetHashKey("technical2")] = {
keys = "universal"
},
[GetHashKey("technical")] = {
keys = "universal"
},
[GetHashKey("bifta")] = {
keys = "universal"
},
[GetHashKey("monster4")] = {
keys = "universal"
},
[GetHashKey("blazer5")] = {
keys = "universal"
},
[GetHashKey("bruiser")] = {
keys = "universal"
},
[GetHashKey("bruiser3")] = {
keys = "universal"
},
[GetHashKey("nightshark")] = {
keys = "universal"
},
[GetHashKey("blazer")] = {
keys = "universal"
},
[GetHashKey("blazer2")] = {
keys = "universal"
},
[GetHashKey("outlaw")] = {
keys = "universal"
},
[GetHashKey("monster5")] = {
keys = "universal"
},
[GetHashKey("winky")] = {
keys = "universal"
},
[GetHashKey("trophytruck")] = {
keys = "universal"
},
[GetHashKey("technical3")] = {
keys = "universal"
},
[GetHashKey("stafford")] = {
keys = "old_car"
},
[GetHashKey("intruder")] = {
keys = "old_car"
},
[GetHashKey("stratum")] = {
keys = "old_car"
},
[GetHashKey("ingot")] = {
keys = "old_car"
},
[GetHashKey("premier")] = {
keys = "old_car"
},
[GetHashKey("emperor3")] = {
keys = "old_car"
},
[GetHashKey("washington")] = {
keys = "old_car"
},
[GetHashKey("fugitive")] = {
keys = "old_car"
},
[GetHashKey("asea")] = {
keys = "old_car"
},
[GetHashKey("romero")] = {
keys = "old_car"
},
[GetHashKey("emperor")] = {
keys = "old_car"
},
[GetHashKey("asea2")] = {
keys = "old_car"
},
[GetHashKey("vorschlaghammer")] = {
keys = "old_car"
},
[GetHashKey("glendale")] = {
keys = "old_car"
},
[GetHashKey("asterope")] = {
keys = "old_car"
},
[GetHashKey("glendale2")] = {
keys = "old_car"
},
[GetHashKey("stanier")] = {
keys = "old_car"
},
[GetHashKey("asterope2")] = {
keys = "old_car"
},
[GetHashKey("warrener2")] = {
keys = "old_car"
},
[GetHashKey("primo")] = {
keys = "old_car"
},
[GetHashKey("tailgater")] = {
keys = "old_car"
},
[GetHashKey("warrener")] = {
keys = "old_car"
},
[GetHashKey("regina")] = {
keys = "old_car"
},
[GetHashKey("primo2")] = {
keys = "old_car"
},
[GetHashKey("Emperor2")] = {
keys = "old_car"
},
[GetHashKey("limo2")] = {
keys = "old_car"
},
[GetHashKey("coach")] = {
keys = "old_car"
},
[GetHashKey("Trash")] = {
keys = "old_car"
},
[GetHashKey("taxi")] = {
keys = "old_car"
},
[GetHashKey("trash2")] = {
keys = "old_car"
},
[GetHashKey("BUS")] = {
keys = "old_car"
},
[GetHashKey("Airbus")] = {
keys = "old_car"
},
[GetHashKey("veto2")] = {
keys = "universal"
},
[GetHashKey("zr3803")] = {
keys = "universal"
},
[GetHashKey("futo2")] = {
keys = "old_car"
},
[GetHashKey("driftfuto")] = {
keys = "old_car"
},
[GetHashKey("comet3")] = {
keys = "old_car"
},
[GetHashKey("zr3802")] = {
keys = "universal"
},
[GetHashKey("banshee")] = {
keys = "old_car"
},
[GetHashKey("fusilade")] = {
keys = "old_car"
},
[GetHashKey("zr350")] = {
keys = "old_car"
},
[GetHashKey("blista2")] = {
keys = "old_car"
},
[GetHashKey("buffalo2")] = {
keys = "old_car"
},
[GetHashKey("driftsentinel")] = {
keys = "old_car"
},
[GetHashKey("gb200")] = {
keys = "old_car"
},
[GetHashKey("comet4")] = {
keys = "old_car"
},
[GetHashKey("raptor")] = {
keys = "universal"
},
[GetHashKey("penumbra")] = {
keys = "old_car"
},
[GetHashKey("veto")] = {
keys = "universal"
},
[GetHashKey("buffalo")] = {
keys = "old_car"
},
[GetHashKey("drifttampa")] = {
keys = "universal"
},
[GetHashKey("jester3")] = {
keys = "old_car"
},
[GetHashKey("sentinel3")] = {
keys = "old_car"
},
[GetHashKey("sultan")] = {
keys = "old_car"
},
[GetHashKey("ruston")] = {
keys = "universal"
},
[GetHashKey("driftremus")] = {
keys = "old_car"
},
[GetHashKey("drifteuros")] = {
keys = "old_car"
},
[GetHashKey("tropos")] = {
keys = "old_car"
},
[GetHashKey("everon2")] = {
keys = "universal"
},
[GetHashKey("omnis")] = {
keys = "universal"
},
[GetHashKey("remus")] = {
keys = "old_car"
},
[GetHashKey("futo")] = {
keys = "old_car"
},
[GetHashKey("sultan2")] = {
keys = "old_car"
},
[GetHashKey("comet2")] = {
keys = "old_car"
},
[GetHashKey("calico")] = {
keys = "old_car"
},
[GetHashKey("elegy")] = {
keys = "old_car"
},
[GetHashKey("sentinel4")] = {
keys = "old_car"
},
[GetHashKey("scramjet")] = {
keys = "universal"
},
[GetHashKey("vigilante")] = {
keys = "universal"
},
[GetHashKey("sultanrs")] = {
keys = "old_car"
},
[GetHashKey("Seminole")] = {
keys = "old_car"
},
[GetHashKey("cavalcade")] = {
keys = "old_car"
},
[GetHashKey("mesa2")] = {
keys = "old_car"
},
[GetHashKey("MESA")] = {
keys = "old_car"
},
[GetHashKey("seminole2")] = {
keys = "old_car"
},
[GetHashKey("BjXL")] = {
keys = "old_car"
},
[GetHashKey("habanero")] = {
keys = "old_car"
},
[GetHashKey("rocoto")] = {
keys = "old_car"
},
[GetHashKey("contender")] = {
keys = "old_car"
},
[GetHashKey("gresley")] = {
keys = "old_car"
},
[GetHashKey("squaddie")] = {
keys = "old_car"
},
[GetHashKey("radi")] = {
keys = "old_car"
},
[GetHashKey("Baller")] = {
keys = "old_car"
},
[GetHashKey("landstalker")] = {
keys = "old_car"
},
[GetHashKey("GRANGER")] = {
keys = "old_car"
},
[GetHashKey("dorado")] = {
keys = "old_car"
},
[GetHashKey("cavalcade2")] = {
keys = "old_car"
},
[GetHashKey("patriot")] = {
keys = "old_car"
},
[GetHashKey("serrano")] = {
keys = "old_car"
},
[GetHashKey("fq2")] = {
keys = "old_car"
},
[GetHashKey("huntley")] = {
keys = "old_car"
},
[GetHashKey("sadler2")] = {
keys = "old_car"
},
[GetHashKey("Utillitruck3")] = {
keys = "old_car"
},
[GetHashKey("Sadler")] = {
keys = "old_car"
},
[GetHashKey("journey")] = {
keys = "universal"
},
[GetHashKey("gburrito")] = {
keys = "universal"
},
[GetHashKey("youga")] = {
keys = "universal"
},
[GetHashKey("CAMPER")] = {
keys = "universal"
},
[GetHashKey("boxville3")] = {
keys = "universal"
},
[GetHashKey("boxville5")] = {
keys = "universal"
},
[GetHashKey("gburrito2")] = {
keys = "universal"
},
}
cfg.VehicleKeysType = {
[0] = "old_car", -- Compacts
[1] = "new_car", -- Sedans
[2] = "new_car", -- SUVs
[3] = "old_car", -- Coupes
[4] = "old_car", -- Muscle
[5] = "old_car", -- Sports Classics
[6] = "new_car", -- Sports
[7] = "new_car", -- Super
[8] = "universal", -- Motorcycles
[9] = "old_car", -- Off-road
[10] = "universal", -- Industrial
[11] = "universal", -- Utility
[12] = "old_car", -- Vans
[13] = "bike", -- Cycles
[14] = "universal", -- Boats
[15] = "universal", -- Helicopters
[16] = "universal", -- Planes
[17] = "universal", -- Service
[18] = "old_car", -- Emergency
[19] = "universal", -- Military
[20] = "universal", -- Commercial
[21] = nil, -- Trains
[22] = "universal", -- Open Wheel
}
function getSetting(key, hash, value)
return cfg.Custom[hash]?.settings?[value] or cfg.Keys[key]?.settings?[value]
end
function createBackwardExport(script, name, cb)
AddEventHandler(("__cfx_export_%s_%s"):format(script, name), function(registerCb)
registerCb(cb)
end)
end
translations = json.decode(LoadResourceFile(GetCurrentResourceName(), "locales/" .. bridge.language .. ".json"))
translations = translations.lua
function translate(side, key)
if translations and translations[side] and translations[side][key] then
return translations[side][key]
end
return Lib.print("Something went wrong with translations", "error")
end
Last updated 1 year ago
---
# 🥦 Weed Laboratory | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#installation-guide)
INSTALLATION GUIDE
----------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#step-0-first-steps)
Step 0 - First Steps
circle-info
**1.** Download your resource from [FiveM's Keymasterarrow-up-right](https://keymaster.fivem.net/asset-grants)
**2.** Unzip the `is-weed`folder and place this folder in your server's resource folder. **3.** Add the resource to your server start config (server.cfg): **ensure is-weed** If you are using a framework, it must be placed anywhere below your framework resource e.g., es\_extended, not above.
ensure es\_extended ensure is-weed
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You **MUST** read all configurable options inside the`**[is-weed/config.lua]**` file and configure them to suit your server's needs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#step-2-adding-items)
Step 2 - Adding Items
circle-info
For the script to function correctly, it's essential to add specific items to your game's database. This section guides you through adding these items, particularly focusing on the phone item and new drugs.
> ####
>
> [hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#adding-a-new-item-to-esx-framework)
>
> Adding a New Item to ESX Framework
To add a new items, to your ESX server, follow these steps:
1. **Access the Database**: Log in to your server's database management tool (like phpMyAdmin).
2. **Navigate to the** `**items**` **Table**: In your database, find the `items` table. This is where all the items for the game are defined.
3. **SQL Command for Adding Items**: To quickly add the items, execute the following SQL command:
Copy
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('ventilation', 'Ventilation', 1, 0, 1),
('ventilation_plus', 'Ventilation Plus', 1, 0, 1),
('heater', 'Heater', 1, 0, 1),
('heater_plus', 'Heater Plus', 1, 0, 1),
('pot', 'Pot', 1, 0, 1),
('pot_plus', 'Pot Plus', 1, 0, 1),
('watering_can', 'Watering Can', 1, 0, 1),
('water_bottle_big', 'Water Bottle', 1, 0, 1);
> ####
>
> [hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#adding-a-new-item-to-qb-core-framework)
>
> Adding a New Item to QB-Core Framework
To add a new items, to your QB-Core server, follow these steps:
1. **Edit the QB-Core Shared File**:
* Navigate to the `qb-core` folder.
* Open the `shared` folder.
* Add a line for the new items in the items list. For example:
Copy
['ventilation'] = {['name'] = 'ventilation', ['label'] = 'Ventilation', ['weight'] = 0, ['type'] = 'item', ['image'] = 'ventilation.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Cheap Equipment: Maximum operating time 24 hours, Maximum fan speed 1200 RPM, Modes - Economy, Balanced, Performance.'},
['ventilation_plus'] = {['name'] = 'ventilation_plus', ['label'] = 'Ventilation Plus', ['weight'] = 0, ['type'] = 'item', ['image'] = 'ventilation.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Expensive Equipment: Maximum operating time 36 hours, Maximum fan speed 1600 RPM, Modes - Economy, Balanced, Performance.'},
['heater'] = {['name'] = 'heater', ['label'] = 'Heater', ['weight'] = 0, ['type'] = 'item', ['image'] = 'heater.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Cheap Equipment: Maximum operating time 36 hours, Maximum temperature 22 degrees Celsius, Modes - Economy, Balanced, Performance.'},
['heater_plus'] = {['name'] = 'heater_plus', ['label'] = 'Heater Plus', ['weight'] = 0, ['type'] = 'item', ['image'] = 'heater.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Expensive Equipment: Maximum operating time 48 hours, Maximum temperature 26 degrees Celsius, Modes - Economy, Balanced, Performance.'},
['pot'] = {['name'] = 'pot', ['label'] = 'Pot', ['weight'] = 0, ['type'] = 'item', ['image'] = 'pot.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Cheap Equipment: Enough for 2 plantings'},
['pot_plus'] = {['name'] = 'pot_plus', ['label'] = 'Pot Plus', ['weight'] = 0, ['type'] = 'item', ['image'] = 'pot.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Expensive Equipment: Enough for 5 plantings.'},
['watering_can'] = {['name'] = 'watering_can', ['label'] = 'Watering Can', ['weight'] = 0, ['type'] = 'item', ['image'] = 'watering_can.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'You will water the plants with this.'},
['water_bottle_big'] = {['name'] = 'water_bottle_big', ['label'] = 'Water Bottle', ['weight'] = 0, ['type'] = 'item', ['image'] = 'water_bottle_big.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'You can fill the Water Tank with this in the Laboratory.'},
* This line defines the item's properties like name, label, weight, and image file.
2. **Add Images to QB-Inventory**:
* Go to the `qb-inventory` folder.
* Place the image for the items in the appropriate directory (usually in `html/img`).
* Ensure the image file name matches the one specified in the shared file.
* [Download the Images Here.arrow-up-right](https://drive.google.com/drive/folders/1egaui4ZcV__XBx4t-xtiJqmcphDUymBH?usp=sharing)
3. **Restart the Server**:
* After making these changes, restart your FiveM server.
* This is necessary for the server to recognize and load the new item configuration.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#adding-a-drugs-items)
\- **Adding a Drugs Items**
**For ESX**:
1. **Database Entry**: Using an SQL command. Adjust the `name`, `label`, and other properties for the drug items.
Copy
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('weed_white_widow_seed', 'White Widow Seed', 1, 0, 1),
('weed_og_kush_seed', 'OG Kush Seed', 1, 0, 1),
('weed_purple_haze_seed', 'Purple Haze Seed', 1, 0, 1),
('weed_gorilla_glue_seed', 'Gorilla Glue Seed', 1, 0, 1),
('weed_white_widow', 'White Widow', 1, 0, 1),
('weed_og_kush', 'OG Kush', 1, 0, 1),
('weed_purple_haze', 'Purple Haze', 1, 0, 1),
('weed_gorilla_glue', 'Gorilla Glue', 1, 0, 1);
**For QB-Core**:
1. **Shared File Update**: Add your drug item in the `shared` folder of `qb-core`, customizing the properties. Set `useable` to `false` for drugs, unless they have a specific use case in the game.
Copy
['weed_white_widow_seed'] = {['name'] = 'weed_white_widow_seed', ['label'] = 'White Widow Seed', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_seed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Package of White Widow variety seeds.'},
['weed_og_kush_seed'] = {['name'] = 'weed_og_kush_seed', ['label'] = 'OG Kush Seed', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_seed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Package of OG Kush variety seeds.'},
['weed_purple_haze_seed'] = {['name'] = 'weed_purple_haze_seed', ['label'] = 'Purple Haze Seed', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_seed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Package of Purple Haze variety seeds.'},
['weed_gorilla_glue_seed'] = {['name'] = 'weed_gorilla_glue_seed', ['label'] = 'Gorilla Glue Seed', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_seed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Package of Gorilla Glue variety seeds.'},
['weed_white_widow'] = {['name'] = 'weed_white_widow', ['label'] = 'White Widow', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_baggy.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A Bag with 1g of White Widow.'},
['weed_og_kush'] = {['name'] = 'weed_og_kush', ['label'] = 'OG Kush', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_baggy.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A Bag with 1g of OG Kush.'},
['weed_purple_haze'] = {['name'] = 'weed_purple_haze', ['label'] = 'Purple Haze', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_baggy.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A Bag with 1g of Purple Haze.'},
['weed_gorilla_glue'] = {['name'] = 'weed_gorilla_glue', ['label'] = 'Gorilla Glue', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weed_baggy.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'A Bag with 1g of Gorilla Glue.'},
2. **Image Addition**: Place the drug image in the `qb-inventory` directory. - [Download the Images Here.arrow-up-right](https://drive.google.com/drive/folders/1egaui4ZcV__XBx4t-xtiJqmcphDUymBH?usp=sharing)
* **Restart the Server**: After making these changes in either framework, restart your server to implement the new items.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#step-3-sql-database)
Step 3 - SQL Database
circle-info
To set up your database for the game, you'll need to create table: weed\_laboratories. Use the following SQL commands to create these tables:
Copy
CREATE TABLE `weed_laboratories` (
`name` varchar(255) DEFAULT NULL,
`coords` text DEFAULT NULL,
`price` int(11) DEFAULT NULL,
`player` varchar(255) DEFAULT NULL,
`lab_keys` text DEFAULT NULL,
`data` text DEFAULT NULL,
`laptop_password` varchar(255) DEFAULT NULL,
`darkweb_rep` int(11) DEFAULT NULL,
`bill` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#step-4-install-dependencies)
Step 4 - Install Dependencies
circle-info
**For the script to function properly, it requires the resources listed below.**
To avoid any issues with the script's performance, ensure that you're using the Latest Version of the Framework or Previous Versions that include the same features.
inside-weed-models - You receive it with your purchase.
inside-interactions - You receive it with your purchase.
[cd\_easytimearrow-up-right](https://github.com/dsheedes/cd_easytime)
- For time management in the interior **Also required: FiveM build 2802+ or higher**
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/weed-laboratory#how-can-i-change-my-notifications)
How can I change my notifications?
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
To properly set up the `clientNotify` and `serverNotify` functions in your FiveM script, follow these steps:
1. **Identify Your Notification System**: First, determine the notification system your server uses.
2. **Learn How to Trigger Notifications**: Once you've identified the notification system, find out how to trigger these notifications. Look for documentation or examples in your existing scripts. Pay attention to the format and arguments required for triggering notifications.
3. **Modify the Notification Functions**:
* In `clientNotify` and `serverNotify`, replace `QBCore:Notify` or `esx:showNotification` with the appropriate event or function call from your notification system.
* Ensure you fill in the arguments correctly. Each notification system has its specific requirements for message text, notification type, duration, and possibly other parameters.
4. **Test Your Notifications**: After setting up, test the notifications in various scenarios to confirm they work correctly. This helps ensure that players receive the right messages at the right time.
Last updated 1 year ago
---
# 🗯️ Dialog V1 | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1#installation-guide)
INSTALLATION GUIDE
----------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_dialog**arrow-up-right](https://keymaster.fivem.net/)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/dialog-v1#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You must read and configure the `config.lua` file in **is\_dialog** to meet your needs.
Last updated 1 year ago
---
# Inventory | inside-scripts
copyCopychevron-down
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server)
---
# inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/information#about-us)
About Us
---------------------------------------------------------------------------------------------
Inside-Script, a team of two developers, has been crafting scripts for FiveM for five years. We focus on innovative, high-quality scripts compatible across FiveM's diverse landscape, from basic job scripts to complex narrative missions with NUI interactions and custom models.
[hashtag](https://inside-scripts.gitbook.io/documentation/information#terms-of-service)
Terms of Service
-------------------------------------------------------------------------------------------------------------
Unauthorized use or distribution of Inside-Script's resources, both free and paid, is strictly forbidden. Users are accountable for the proper use of scripts and associated tokens.
Violations will result in:
1. Banning of the involved account and email from Inside-Script’s platform.
2. Discord account ban from Inside-Script’s community.
3. No refunds for revoked or banned assets.
4. DMCA notices to any involved Discord servers or hosting services, likely leading to their shutdown.
5. Reporting to the FiveM administration for servers using leaked scripts.
At Inside-Script, our priority is to innovate and provide exceptional scripts and support to the FiveM community. We dedicate our time to development and customer support rather than combating script leaks.
[hashtag](https://inside-scripts.gitbook.io/documentation/information#support)
Support
-------------------------------------------------------------------------------------------
Our support includes detailed documentation and installation guides. We assist our customers and confirmed developers through our [**Discord**arrow-up-right](https://discord.com/invite/URKNMSwx5W)
channel via ticket-based support. We expect basic Lua coding knowledge from our customers.
Last updated 1 year ago
---
# 🖥️ Bridge & Library | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts#bridge)
Bridge
------------------------------------------------------------------------------------------
It is a resource that facilitates communication between different systems on the FiveM platform, such as [**Framework**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#framework)
, [**Inventory**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#inventory)
, [**Fuel**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#fuel)
, [**Keys**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#keys)
, [**Notifications**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#notifications)
, [**Progress Bars**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#progress-bar)
, and [**Target**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/compatibility#target)
. It enables the integration and cooperation of these systems, eliminating the need for direct connections and simplifying script management, ensuring consistency and flexibility in project development.
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts#library)
Library
--------------------------------------------------------------------------------------------
It is a resource independent of other systems on the FiveM platform, offering improvements and extensions to FiveM's native functions. This allows creators to build scripts more easily and efficiently by utilizing ready-made solutions.
Last updated 1 year ago
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/server#show)
show
----------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/server#usage)
Usage
Copy
bridge.notification.show(src, data)
* src: `number`
* data: `object`
* title(optional): `string`
* message: `string`
* duration: `number`
* style: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/server#example)
Example
Copy
bridge.notification.show(src, {
title = "Example Title",
message = "Example Message",
duration = 5000,
style = "info",
})
Last updated 1 year ago
---
# Config | inside-scripts
Copy
cfg = {}
cfg.permission = "admin"
cfg.Police = {
job = {"police", "lspd"},
checkDuty = true,
required = {
retail = 0,
wholesale = 0
}
}
cfg.trapPhone = {
price = 5000,
itemName = "trap_phone"
}
cfg.commands = {
status = "selldrugs", -- "example" or nil
checkStats = "sd-stats",
addRespect = "sd-addrep",
removeRespect = "sd-removerep",
addSkill = "sd-addskill",
removeSkill = "sd-removeskill",
addMole = "sd-addmole",
removeMole = "sd-removemole",
}
cfg.Webhook = {
adminCommands = "",
mole = "",
retail = "",
wholesale = "",
}
cfg.Drugs = {
["meth"] = {price = {retail = 50, wholesale = 25}, maxPriceMultiplier = {retail = 2.0, wholesale = 2.0}},
}
cfg.moneyType = "cash" -- "cash", "bank", "itemName"
cfg.moneyTypeItem = false -- true if "cash", "itemName" etc. is Item
cfg.respectLimit = 10000
cfg.skillLimit = 250
cfg.Retail = {
SuccessfulSale = function(src, item, count, price)
-- place your function here (Server Side)
end,
clientCooldown = 300000, -- in ms
policeAlertChance = 60,
policeAlertOnSale = false,
interestInDrugs = 100,
maxQuantity = 5,
increase = {
respect = 1,
skill = 1
},
decrease = {
respect = 1,
skill = 1
}
}
cfg.Wholesale = {
SuccessfulSale = function(src, item, count, price)
-- place your function here (Server Side)
end,
minimumRespect = 1000,
minQuantity = 50,
maxQuantity = 300,
maxActiveOffers = 10,
pedsArmorChance = 75,
offerCurrentPlayerDrugs = false,
pedsRobberyMoney = {min = 2500, max = 10000}, -- We get the default value of money from the agreed order (the negotiated price of the drug * quantity of the drug + a random value from this setting)
pedsWeapons = {GetHashKey("weapon_microsmg"), GetHashKey("weapon_pumpshotgun_mk2"), GetHashKey("weapon_vintagepistol"), GetHashKey("weapon_knife")},
playerAllowedWeapons = {GetHashKey("weapon_unarmed")},
increase = {
respect = 25,
skill = 5,
},
decrease = {
notAttendMeeting = {
respect = 50,
skill = 25,
},
leaveZone = {
respect = 50,
skill = 25,
},
dontHaveDrug = {
respect = 100,
skill = 50,
},
attackBuyer = {
respect = 3000,
skill = 100,
},
failedNegotiation = {
respect = 25,
skill = 5,
}
},
receiveMessage = {
unit = "s", -- "s" - seconds or "m" - minutes or "h" - hours or "d" - days or "w" - weeks
count = 10,
},
waitingForPlayer = {
unit = "m", -- "s" - seconds or "m" - minutes or "h" - hours or "d" - days or "w" - weeks
count = 30,
},
places = {
{
veh_coords = vector4(-1273.71, -810.19, 17.05, 306.62),
vehicle = "sultan", -- must be 4door
peds = {
{offset = {x = 0.0, y = -4.0, z = 0.0}, model = "G_M_Y_SalvaGoon_03", buyer = true},
{offset = {x = 2.5, y = -4.0, z = 0.0}, model = "G_M_M_CartelGuards_01"},
{offset = {x = -2.5, y = -4.0, z = 0.0}, model = "G_M_M_CartelGuards_02"},
}
},
{
veh_coords = vector4(-810.38, -753.36, 22.09, 268.91),
vehicle = "cavalcade",
peds = {
{offset = {x = 0.0, y = -4.0, z = 0.0}, model = "G_M_Y_SalvaBoss_01", buyer = true},
{offset = {x = 2.5, y = -4.0, z = 0.0}, model = "G_M_Y_FamDNF_01"},
{offset = {x = -2.5, y = -4.0, z = 0.0}, model = "G_F_Y_Families_01"},
}
},
{
veh_coords = vector4(-1539.91, -583.33, 33.34, 215.11),
vehicle = "washington",
peds = {
{offset = {x = 0.0, y = -4.0, z = 0.0}, model = "a_m_m_malibu_01", buyer = true},
{offset = {x = 2.5, y = -4.0, z = 0.0}, model = "a_m_m_hillbilly_02"},
{offset = {x = -2.5, y = -4.0, z = 0.0}, model = "a_m_m_rurmeth_01"},
}
},
{
veh_coords = vector4(-1449.62, -380.37, 37.79, 290.71),
vehicle = "stratum",
peds = {
{offset = {x = 0.0, y = -4.0, z = 0.0}, model = "a_m_m_golfer_01", buyer = true},
{offset = {x = 2.5, y = -4.0, z = 0.0}, model = "a_m_m_eastsa_01"},
{offset = {x = -2.5, y = -4.0, z = 0.0}, model = "a_m_m_eastsa_02"},
}
},
{
veh_coords = vector4(-320.82, -55.23, 53.95, 339.76),
vehicle = "primo",
peds = {
{offset = {x = 0.0, y = -4.0, z = 0.0}, model = "a_m_y_beachvesp_02", buyer = true},
{offset = {x = 2.5, y = -4.0, z = 0.0}, model = "a_m_y_cyclist_01"},
{offset = {x = -2.5, y = -4.0, z = 0.0}, model = "a_m_y_eastsa_01"},
}
},
}
}
cfg.Mole = {
Peds = {
junkie = {
["Joe"] = {model = "a_m_m_trampbeac_01", coords = vector4(-717.09, -905.32, 20.0, 63.43), price = 2500},
["Casey"] = {model = "a_m_y_hippy_01", coords = vector4(-364.35, -350.95, 31.56, 251.99), price = 2500},
["Jamie"] = {model = "a_m_y_methhead_01", coords = vector4(-1451.17, -579.44, 31.25, 213.6), price = 2500},
["Blake"] = {model = "a_m_o_genstreet_01", coords = vector4(-965.53, -1172.45, 2.15, 293.15), price = 2500},
["Drew"] = {model = "a_m_o_tramp_01", coords = vector4(776.65, -1194.67, 24.29, 72.89), price = 2500},
},
criminal = {
["Louis"] = {model = "a_m_m_soucent_04", coords = vector4(1141.28, -1657.09, 36.41, 34.49), price = 5000},
["Charlie"] = {model = "G_M_Y_PoloGoon_02", coords = vector4(152.34, -72.67, 71.86, 340.98), price = 5000},
["Noah"] = {model = "G_M_Y_PoloGoon_01", coords = vector4(-1590.74, -412.46, 43.06, 45.73), price = 5000},
["Morgan"] = {model = "G_M_M_CartelGoons_01", coords = vector4(-982.47, -270.98, 38.29, 223.28), price = 5000},
["Taylor"] = {model = "G_M_M_MaraGrande_01", coords = vector4(-280.89, 193.68, 85.56, 350.64), price = 5000},
},
professional = {
["Blackie"] = {model = "a_m_m_og_boss_01", coords = vector4(-26.96, -1531.43, 30.52, 314.79), price = 15000},
["Debony"] = {model = "G_M_Y_StrPunk_02", coords = vector4(332.55, -1990.2, 30.64, 42.54), price = 15000},
["Jordan"] = {model = "a_m_m_tourist_01", coords = vector4(-2005.01, -356.68, 26.1, 140.32), price = 15000},
["Riley"] = {model = "a_m_m_soucent_01", coords = vector4(-534.31, -2216.95, 6.39, 227.89), price = 15000},
["Alex"] = {model = "a_m_m_salton_02", coords = vector4(948.43, -2102.17, 30.67, 209.5), price = 15000},
}
},
Blips = {
junkie = {
normal = {
sprite = 280,
scale = 1.0,
color = 1,
alpha = 255,
shortRange = false,
name = "Junkie:"
},
radius = {
color = 1,
alpha = 55,
shortRange = false,
}
},
criminal = {
normal = {
sprite = 280,
scale = 1.0,
color = 26,
alpha = 255,
shortRange = false,
name = "Criminal:"
},
radius = {
color = 26,
alpha = 55,
shortRange = false,
}
},
professional = {
normal = {
sprite = 280,
scale = 1.0,
color = 2,
alpha = 255,
shortRange = false,
name = "Professional:"
},
radius = {
color = 2,
alpha = 55,
shortRange = false,
}
},
police = {
sprite = 137,
scale = 1.0,
color = 0,
alpha = 255,
shortRange = false,
name = "Last Seen Officer",
removeAfter = 10000
}
},
Range = {
junkie = 75.0,
criminal = 125.0,
professional = 200.0,
},
Respect = {
junkie = 0,
criminal = 1500,
professional = 6000,
},
Subscription = {
unit = "d", -- "s" - seconds or "m" - minutes or "h" - hours or "d" - days or "w" - weeks
count = 3,
}
}
cfg.Animations = {
dialog = {
["male"] = {
{dict = "anim@heists@heist_corona@team_idles@male_a", anim = "idle"},
{dict = "anim@mp_corona_idles@male_c@idle_a", anim = "idle_a"},
{dict = "anim@mp_corona_idles@male_d@idle_a", anim = "idle_a"},
},
["female"] = {
{dict = "anim@mp_corona_idles@female_b@idle_a", anim = "idle_a"},
{dict = "mp_move@prostitute@m@french", anim = "idle"},
{dict = "anim@heists@heist_corona@team_idles@female_a", anim = "idle"},
},
},
trade = {
{dict = "mp_common", anim = "givetake1_a", duration = 2000, swap = 1000},
{dict = "mp_ped_interaction", anim = "handshake_guy_a", duration = 3000, swap = 1500}
},
steal = {
{dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@", anim = "machinic_loop_mechandplayer", duration = 2000},
},
putInTrunk = {
{dict = "anim@heists@narcotics@trash", anim = "throw_b", duration = 1000}
}
}
function dispatch(player, callingPed)
-- place your function here
end
function clientNotify(message, duration, style)
bridge.notification.show({
title = false,
message = message,
duration = duration,
style = style,
})
end
function serverNotify(source, message, duration, style)
bridge.notification.show(source, {
title = false,
message = message,
duration = duration,
style = style,
})
end
Last updated 1 year ago
---
# Progress Bar | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client)
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/client#show)
show
----------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/client#usage)
Usage
Copy
bridge.notification.show(data)
* data: `object`
* title(optional): `string`
* message: `string`
* duration: `number`
* style: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/client#example)
Example
Copy
bridge.notification.show({
title = "Example Title",
message = "Example Message",
duration = 5000,
style = "info",
})
Last updated 1 year ago
---
# 🔑 Vehicle Keys | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#installation-guide)
INSTALLATION GUIDE
------------------------------------------------------------------------------------------------------------------
circle-check
The script has Backward Compatibility with qb-vehiclekeys and qbx\_vehiclekeys.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_vehiclekeys**arrow-up-right](https://portal.cfx.re/assets/granted-assets?page=1&sort=asset.updated_at&direction=asc)
from CFX Portal and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#step-1-adding-lock-pick-item)
Step 1 - Adding Lock Pick Item
circle-info
Navigate to the following file and paste our code.
**Overextended Inventory (QBox, ESX):**
`ox_inventory/data/items.lua`
Copy
['carlockpick'] = {
label = "Car Lockpick",
weight = 1000,
stack = true,
close = true,
description = "Perfect when you forget your keys... or have other plans",
client = {
image = "lockpick.png",
event = "is_vehiclekeys:useLockPick",
}
},
**QBCore:**
`qb-core/shared/items.lua`
Copy
carlockpick = {name = "carlockpick", label = "Car Lockpick", weight = 1000, type = "item", image = "lockpick.png", unique = false, usable = true, shoudClose = true, description = "Perfect when you forget your keys... or have other plans"},
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#step-2-configure-resources)
Step 2 - Configure Resources
circle-info
You must read and configure the `config.lua` file in **is\_vehiclekeys** to meet your needs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#adding-custom-vehicle)
Adding Custom Vehicle
circle-info
UGo to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with the vehicle brand, model, and its logo.
* vehicle: `object`
* make?: `string`
* model?: `string`
* img?: `string("images/yourimg.png" or Direct URL)`
**Example**
Copy
[GetHashKey("comet6")] = {
vehicle = {make = "Pfister", model = "Comet VI"},
},
[GetHashKey("bmx")] = {
vehicle = {make = "Subrosa", model = "BMX", img = "images/subrosa.png"},
},
[GetHashKey("police")] = {
vehicle = {make = "Vapid", img = "images/vapid.webp"},
},
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#adding-key-for-vehicle-class)
Adding Key for Vehicle Class
circle-info
Go to `config.lua` and find `cfg.VehicleKeysType`, where you can set the key type for each vehicle class. The available key types are: `new_car`, `old_car`, `universal`, and `bike`.
**Example**
Copy
cfg.VehicleKeysType = {
[0] = "old_car", -- Compacts
[1] = "new_car", -- Sedans
[2] = "new_car", -- SUVs
[3] = "old_car", -- Coupes
[4] = "old_car", -- Muscle
[5] = "old_car", -- Sports Classics
[6] = "new_car", -- Sports
[7] = "new_car", -- Super
[8] = "universal", -- Motorcycles
[9] = "old_car", -- Off-road
[10] = "universal", -- Industrial
[11] = "universal", -- Utility
[12] = "old_car", -- Vans
[13] = "bike", -- Cycles
[14] = "universal", -- Boats
[15] = "universal", -- Helicopters
[16] = "universal", -- Planes
[17] = "universal", -- Service
[18] = "old_car", -- Emergency
[19] = "universal", -- Military
[20] = "universal", -- Commercial
[21] = nil, -- Trains
[22] = "universal", -- Open Wheel
}
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#adding-custom-key)
Adding Custom Key
circle-info
Go to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with a specified key.
* keys: `string`
**Example**
Copy
[GetHashKey("sadler2")] = {
keys = "old_car",
},
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts#adding-custom-settings-for-vehicle)
Adding Custom Settings for Vehicle
circle-info
Go to `config.lua` and find `cfg.Custom`. Here, you just need to create an object with the specified data.
* settings: `object`
* alarm?: `object`
* enabled: `boolean`
* activeOnFailLockPick: `boolean`
* activeOnSuccessLockPick: `boolean`
* activeOnSearchingKeys: `boolean`
* activeOnHotwiring: `boolean`
* handlePull: `boolean`
* toggleLockDeactivate: `boolean`
* min: `number`
* max: `number`
* hotwiring?: `object`
* successChance: `number(0-100)`
* maxAttempts: `number`
* min: `number`
* max: `number`
* keysearching?: `object`
* successChance: `number(0-100)`
* rewardChance: `number(0-100)`
* rewards: `array of objects`
* item: `boolean`
* name: `string(item name or "cash"/"bank")`
* label?: `string`
* count: `object`
* min: `number`
* max: `number`
* min: `number`
* max: `number`
* lockpick?: `object`
* enabled: `boolean`
* keyBreakOnSuccess: `number(0-100)`
* keyBreakOnFail: `number(0-100)`
* minigame: `function`
* return: `boolean`
* anim\_lock?: `function`
* anim\_unlock?: `function`
**Example**
Copy
[GetHashKey("zentorno")] = {
settings = {
alarm = {
enabled = true,
activeOnFailLockPick = true,
activeOnSuccessLockPick = true,
activeOnSearchingKeys = true,
activeOnHotwiring = true,
handlePull = true,
toggleLockDeactivate = true,
min = 30000,
max = 60000,
},
hotwiring = {
successChance = 25, -- 0 - 100%
maxAttempts = 4,
min = 10000,
max = 20000,
},
keysearching = {
successChance = 10, -- 0 - 100%
rewardChance = 75, -- 0 - 100%
rewards = {
{item = true, name = "carlockpick", label = "Lock Pick", count = {min = 1, max = 2}},
{item = false, name = "cash", count = {min = 100, max = 1000}},
},
min = 10000,
max = 20000,
},
lockpick = {
enabled = true,
keyBreakOnSucces = 50, -- 0 - 100%
keyBreakOnFail = 75, -- 0 - 100%
minigame = function()
return lib.skillCheck("hard")
end,
},
anim_lock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 5000, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
hornAnim(veh, {
{duration = 200, gap = 0},
})
end,
anim_unlock = function(veh)
lightAnim(veh, 3.0, true, {
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 125, gap = 25, fadeIn = true, fadeOut = false},
{duration = 2500, gap = 25, fadeIn = true, fadeOut = true},
})
local suspensionHeight = GetVehicleSuspensionHeight(veh)
suspensionAnim(veh, {
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
{duration = 500, gap = 100, height = suspensionHeight + 0.015},
{duration = 500, gap = 100, height = suspensionHeight},
})
end,
},
},
Last updated 1 year ago
---
# 💊 Sell Drugs | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#installation-guide)
INSTALLATION GUIDE
-----------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#step-0-first-steps)
Step 0 - First Steps
circle-info
Download [**is\_selldrugs**arrow-up-right](https://keymaster.fivem.net/)
from KeyMaster and install [**is\_bridge & is\_lib**](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/usage-and-installation)
.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#step-1-configure-resource)
Step 1 - Configure Resource
circle-info
You must read and configure the `config.lua` file in **is\_selldrugs** to meet your needs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#step-2-adding-items)
Step 2 - Adding Items
circle-info
For the script to function correctly, it's essential to add specific items to your game's database. This section guides you through adding these items, particularly focusing on the phone item and new drugs.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#adding-a-phone-item)
**\- Adding a Phone Item**
To use the Trap Phone and receive wholesale orders, you first need to **add the phone to your engine** (**QBCore/ESX**). The item name for the Trap Phone should match the one specified in `config.lua` (default `trap_phone`). [You can download the image for the Trap Phone that we use from here.arrow-up-right](https://drive.google.com/file/d/1nSJVRzNsqxHEQLVYs163YUkLmyZ7UtJ3/view)
> ####
>
> [hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#adding-a-trap-phone-to-esx-framework)
>
> Adding a Trap Phone to ESX Framework
1. **Access the Database**: Log in to your server's database management tool (like phpMyAdmin).
2. **Navigate to the** `**items**` **Table**: In your database, find the `items` table. This is where all the items for the game are defined.
3. **Insert New Item**: Add a new entry for the `trap_phone`. You can do this manually using the tool's interface, or you can run an SQL command.
4. **SQL Command for Adding Trap Phone**: To quickly add the item, execute the following SQL command:
Copy
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('trap_phone', 'Trap Phone', 1, 0, 1);
* `name`: 'trap\_phone' (This is the identifier used in your script)
* `label`: 'Trap Phone' (The display name for the item)
* `weight`: 1 (The weight of the item)
* `rare`: 0 (Indicates the rarity, 0 for common)
* `can_remove`: 1 (Whether the item can be removed from inventory)
> ####
>
> [hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#adding-a-trap-phone-to-qb-core-framework)
>
> Adding a Trap Phone to QB-Core Framework
1. **Edit the QB-Core Shared File**:
* Navigate to the `qb-core` folder.
* Open the `shared/items.lua` file.
* Add a line for the new item in the items list. For example:
Copy
['trap_phone'] = {['name'] = 'trap_phone', ['label'] = 'Trap Phone', ['weight'] = 500, ['type'] = 'item', ['image'] = 'trapPhone.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Maybe you will find more serious clients to talk to here.'},
* This line defines the item's properties like name, label, weight, and image file.
2. **Add Image to QB-Inventory**:
* Go to the `qb-inventory` folder.
* Place the image for the item in the appropriate directory (usually in `html/img`).
* Ensure the image file name matches the one specified in the shared file (`trapPhone.png`).
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#adding-a-drugs-item)
\- **Adding a Drugs Item**
In the `config.lua` file, you need to configure the list of items that players can sell. You need to provide data such as the item name, wholesale price, and retail price. When adding a new drug, you also need to add its image, for example, from your inventory system. To do this, you need to obtain the item image (**.png**), then name it the same as the drug name, and move it to `is_selldrugs/html/img/inventory`.
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#step-3-sql-database)
Step 3 - SQL Database
circle-info
For the script to work correctly, it needs integration with the database. You can add it using the following SQL command or import the SQL file provided with the script.
Copy
CREATE TABLE `selldrugs_players` (
`player` varchar(255) DEFAULT NULL,
`respect` int(11) NOT NULL DEFAULT 0,
`sale_skill` int(11) NOT NULL DEFAULT 0,
`mole` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
Copy
CREATE TABLE `selldrugs_phone` (
`player` varchar(255) NOT NULL,
`settings` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#step-4-install-dependencies)
Step 4 - Install Dependencies
circle-info
To use the script, the following resources are required:
* [**is\_lib**arrow-up-right](https://github.com/inside-scripts/is_lib)
**-** and resources [**compatible with this library**arrow-up-right](https://inside-scripts.gitbook.io/documentation/free-scripts/library)
, such as **framework**, **inventory**, **target**
* [**oxmysql**arrow-up-right](https://github.com/overextended/oxmysql)
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#using-a-trigger-instead-of-a-command)
Using a Trigger instead of a Command
In `config.lua`, set the value in the `cfg.commands.status` table to `nil` to disable the command. Once you've done that, use a Trigger to activate/deactivate retail sales.
Client-Side
Server-Side
Copy
TriggerServerEvent("is_selldrugs:changeRetailStatus")
Copy
TriggerEvent("is_selldrugs:changeRetailStatus", source)
###
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs#adding-to-radial-menu)
Adding to Radial Menu
The above triggers may not work because some scripts, such as **qb-radialmenu**, send information about a table in the argument instead of the arguments or player ID we send. This can be solved by adding the following code to `config.lua`. We use it with the trigger type `client` and paste the trigger name, which is `is_selldrugs:radialMenu`.
Copy
RegisterNetEvent("is_selldrugs:radialMenu", function()
TriggerServerEvent("is_selldrugs:changeRetailStatus")
end)
Last updated 1 year ago
---
# Shared | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#print)
print
--------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage)
Usage
Copy
Lib.print(message, type)
* message: `string`
* type(optional): `"error"` or `"success"` or `"info"`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example)
Example
Copy
Lib.print(message)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#debug)
debug
--------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-1)
Usage
Copy
Lib.debug(value, indent)
* value: `any`
* indent(optional): `number`
* default: `0`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-1)
Example
Copy
Lib.debug({
age = 25,
name = "Keyton Johnson",
})
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#refint)
refInt
----------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-2)
Usage
Copy
Lib.refInt(int)
* int: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-2)
Example
Copy
Lib.refInt(5000)
* return: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#missingvalue)
missingValue
----------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-3)
Usage
Copy
Lib.missingValue(int1, int2)
* int1: `number`
* int2: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-3)
Example
Copy
Lib.missingValue(5000, 2500)
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#roundto)
roundTo
------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-4)
Usage
Copy
Lib.roundTo(int, round)
* int: `number`
* round: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-4)
Example
Copy
Lib.roundTo(50.4782, 2)
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#checksuccess)
checkSuccess
----------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-5)
Usage
Copy
Lib.checkSuccess(int)
* int: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-5)
Example
Copy
Lib.checkSuccess(50)
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#randomstring)
randomString
----------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-6)
Usage
Copy
Lib.randomString(length, pattern)
* length: number
* pattern: `"A"` - letters or `"a"` - small letters or `0` - numbers or `nil` - letters, small letters, numbers
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-6)
Example
Copy
Lib.randomString(30, nil)
return: `string` or `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#isexportavailable)
isExportAvailable
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-7)
Usage
Copy
Lib.isExportAvailable(resource, func)
* resource: `string`
* func: `function`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-7)
Example
Copy
Lib.isExportAvailable("resource", test)
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#capitalizefirstletter)
capitalizeFirstLetter
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-8)
Usage
Copy
Lib.capitalizeFirstLetter(text)
* text: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-8)
Example
Copy
Lib.capitalizeFirstLetter("test")
* return: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#copytable)
copyTable
----------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#usage-9)
Usage
Copy
Lib.copyTable(value)
* value: `object` or `array`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared#example-9)
Example
Copy
Lib.copyTable({
age = 25,
name = "Keyton Johnson",
})
* return: `object` or `array`
Last updated 1 year ago
---
# Identifier | inside-scripts
copyCopychevron-down
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server)
---
# Config | inside-scripts
Copy
cfg.Prefix = QBCore
cfg.TriggerPrefix = "QBCore"
cfg.ExportPrefix = "qb-core"
cfg.Language = 'en' -- Language to load from locales
cfg.Courier_Cooldown = {min = 2, max = 5}
cfg.Keys_Limit = 5
cfg.Temperature_Unit = "Celsius" -- "Celsius" or "Fahrenheit"
cfg.sale_ped_model = "S_M_Y_DevinSec_01"
cfg.sell_lab_tax = 25
cfg.Time = { -- Actually configured for "GMT +1"
["Zone"] = "plus", -- "plus" or "minus"
["Zone_Count"] = 1,
["Format"] = 24 -- 24 or 12 (PM/AM)
}
cfg.Bill = {
pricePerWattage = 5,
daysToPay = 7
}
cfg.Air_Conditioning = "prop_aircon_s_03a"
cfg.Delivery_Packages = {
"prop_mp_drug_package", "prop_mp_drug_pack_blue", "prop_mp_drug_pack_red"
}
cfg.Pot = {
"weed_pot_empty", "sf_prop_sf_weed_01_small_01a", "sf_prop_sf_weed_med_01a", "sf_prop_sf_weed_lrg_01a"
}
cfg.Seed = {
temperature_tolerance = {["Celsius"] = 1.5, ["Fahrenheit"] = 10.0},
temperature_multiplier = 0.5,
max_growth_multiplier = 1.25,
["weed_white_widow_seed"] = {
label = "White Widow",
drug = "weed_white_widow",
price = 2000,
rep = 0,
increase_rep = 1,
description = "White Widow is a balanced hybrid strain of Cannabis indica and Cannabis sativa. White Widow is a cross between a Brazilian sativa strain and a resin-heavy South Indian indica.",
temperature = {["Celsius"] = 18, ["Fahrenheit"] = 64.4},
increase_progress = 0.0005, -- ~55 hours (0-100%)
decrease_hydration = 0.0015, -- ~19 hours (100-0%)
cut_weed = {
[1] = nil,
[2] = {min = 50, max = 75},
[3] = {min = 100, max = 150},
[4] = {min = 200, max = 400}
}
},
["weed_og_kush_seed"] = {
label = "OG Kush",
drug = "weed_og_kush",
price = 4000,
rep = 50,
increase_rep = 1,
description = "OG Kush is a hybrid marijuana strain with a distinctive earthy, pine, woody aroma. It is well-known for its relaxing and euphoric effects.",
temperature = {["Celsius"] = 20, ["Fahrenheit"] = 68},
increase_progress = 0.0005, -- ~55 hours (0-100%)
decrease_hydration = 0.0015, -- ~19 hours (100-0%)
cut_weed = {
[1] = nil,
[2] = {min = 50, max = 75},
[3] = {min = 100, max = 150},
[4] = {min = 200, max = 400}
}
},
["weed_purple_haze_seed"] = {
label = "Purple Haze",
drug = "weed_purple_haze",
price = 6000,
rep = 100,
increase_rep = 1,
description = "Purple Haze is a sativa dominant hybrid (85% sativa/15% indica) strain that is a potent cross between the rare yet popular Purple Thai X Haze strains.",
temperature = {["Celsius"] = 22, ["Fahrenheit"] = 71.6},
increase_progress = 0.0005, -- ~55 hours (0-100%)
decrease_hydration = 0.0015, -- ~19 hours (100-0%)
cut_weed = {
[1] = nil,
[2] = {min = 50, max = 75},
[3] = {min = 100, max = 150},
[4] = {min = 200, max = 400}
}
},
["weed_gorilla_glue_seed"] = {
label = "Gorilla Glue",
drug = "weed_gorilla_glue",
price = 10000,
rep = 150,
increase_rep = 1,
description = "Gorilla Glue is a potent hybrid strain that delivers heavy-handed euphoria and relaxation, leaving you feeling “glued” to the couch",
temperature = {["Celsius"] = 24, ["Fahrenheit"] = 75.2},
increase_progress = 0.0005, -- ~55 hours (0-100%)
decrease_hydration = 0.0015, -- ~19 hours (100-0%)
cut_weed = {
[1] = nil,
[2] = {min = 50, max = 75},
[3] = {min = 100, max = 150},
[4] = {min = 200, max = 400}
}
}
}
cfg.Parts = {
["ventilation"] = {usageTime = 24, increase_progress = 0.000025, mode = {["Economy"] = {Power = 20, RPM = 800}, ["Balanced"] = {Power = 40, RPM = 1000}, ["Performance"] = {Power = 60, RPM = 1200}}},
["ventilation_plus"] = {usageTime = 36, increase_progress = 0.00005, mode = {["Economy"] = {Power = 10, RPM = 1200}, ["Balanced"] = {Power = 20, RPM = 1400}, ["Performance"] = {Power = 30, RPM = 1600}}},
["heater"] = {usageTime = 36, increase_progress = 0.000025, mode = {["Off"] = {Power = 0, Temperature = {["Celsius"] = 5, ["Fahrenheit"] = 41.0}}, ["Economy"] = {Power = 50, Temperature = {["Celsius"] = 20, ["Fahrenheit"] = 68.0}}, ["Balanced"] = {Power = 70, Temperature = {["Celsius"] = 22, ["Fahrenheit"] = 71.6}}, ["Performance"] = {Power = 100, Temperature = {["Celsius"] = 24, ["Fahrenheit"] = 75.2}}}},
["heater_plus"] = {usageTime = 48, increase_progress = 0.00005, mode = {["Off"] = {Power = 0, Temperature = {["Celsius"] = 5, ["Fahrenheit"] = 41.0}}, ["Economy"] = {Power = 25, Temperature = {["Celsius"] = 20, ["Fahrenheit"] = 68.0}}, ["Balanced"] = {Power = 35, Temperature = {["Celsius"] = 22, ["Fahrenheit"] = 71.6}}, ["Performance"] = {Power = 50, Temperature = {["Celsius"] = 24, ["Fahrenheit"] = 75.2}}}},
["pot"] = {usage = 2},
["pot_plus"] = {usage = 5},
["water_tank"] = {capacity = 200.0},
["water_bottle_big"] = {capacity = 10.0},
["watering_can"] = {capacity = 3.0}
}
cfg.Laptop = {
apps = {
["parts-shop"] = {
{
category = {name = "House", img = "apps/parts-shop/house.png"},
items = {
{name = "ventilation", label = "Ventilation Kit", price = 1999, img = "apps/parts-shop/ventilation_item.png", usageTime = cfg.Parts["ventilation"].usageTime},
{name = "ventilation_plus", label = "Ventilation Kit Plus", price = 3999, img = "apps/parts-shop/ventilation_plus_item.png", usageTime = cfg.Parts["ventilation_plus"].usageTime},
{name = "heater", label = "Heater", price = 2999, img = "apps/parts-shop/heater_item.png", usageTime = cfg.Parts["heater"].usageTime},
{name = "heater_plus", label = "Heater Plus", price = 5999, img = "apps/parts-shop/heater_plus_item.png", usageTime = cfg.Parts["heater_plus"].usageTime},
}
},
{
category = {name = "Garden", img = "apps/parts-shop/garden.png"},
items = {
{name = "pot", label = "Pot", price = 89, img = "apps/parts-shop/pot_item.png", usage = cfg.Parts["pot"].usage},
{name = "pot_plus", label = "Pot Plus", price = 199, img = "apps/parts-shop/pot_plus_item.png", usage = cfg.Parts["pot_plus"].usage},
{name = "watering_can", label = "Watering Can", price = 299, img = "apps/parts-shop/watering_can_item.png" , capacity = cfg.Parts["watering_can"].capacity},
{name = "water_bottle_big", label = "Water Bottle Big", price = 99, img = "apps/parts-shop/water_bottle_big_item.png", capacity = cfg.Parts["water_bottle_big"].capacity}
}
}
}
}
}
function progressBar(data)
-- data / title, duration, icon, cannotMove, cancelable
-- return true or false
-- inside-ui
-- return exports["inside-ui"]:ProgressBar(data.title, data.duration, data.icon, data.cannotMove, data.cancelable)
local result
cfg.Prefix.Functions.Progressbar("inside-weed", data.title, data.duration, false, data.cancelable, {
disableMovement = data.cannotMove,
disableCombat = data.cannotMove,
}, {}, {}, {}, function() -- Done
result = true
end, function() -- Cancel
result = false
end)
return result
end
function clientNotify(txt, duration, style)
-- inside-ui
-- exports["inside-ui"]:Notify(false, txt, duration, type)
if style == "info" then style = "primary" end
TriggerEvent('QBCore:Notify', txt, style, duration)
end
function serverNotify(id, txt, duration, style)
-- inside-ui
-- TriggerClientEvent("inside-ui:Notify", id, false, txt, duration, type)
if style == "info" then style = "primary" end
TriggerClientEvent('QBCore:Notify', id, txt, style, duration)
end
**Server Configuration**
Copy
cfg.Prefix.Commands.Add('weed-create', translate("server", "command_creator_info"), {}, false, function(source)
TriggerClientEvent("Weed:CreatorNUI", source)
end, 'admin')
function CreateUsableItems()
for k, v in pairs(cfg.Seed) do
cfg.Prefix.Functions.CreateUseableItem(k, function(source, item)
if onlinePlayers["id:"..source].isBuilding then serverNotify(source, translate("server", "notify_config_error_1"), 3000, "error") return end
if onlinePlayers["id:"..source].hasWateringCan then serverNotify(source, translate("server", "notify_config_error_2"), 3000, "error") return end
local freePots = 0
local inLab = onlinePlayers["id:"..source].inInterior
local gotKeys = false
if inLab then
if Lab[inLab].data.cleaning then serverNotify(source, translate("server", "notify_config_info_1"), 3000, "info") return end
for _, labName in pairs(onlinePlayers["id:"..source].keys) do
if labName == inLab then
gotKeys = true
break
end
end
if not gotKeys then serverNotify(source, translate("server", "notify_config_error_3"), 3000, "error") return end
for k, v in pairs(Lab[inLab].data.pots) do
if v.item and not v.seed then
freePots = freePots + 1
end
end
if freePots == 0 then serverNotify(source, translate("server", "notify_config_error_4"), 3000, "error") return end
TriggerClientEvent("Weed:Get_Nearest_Pot", source, inLab, k)
else
serverNotify(source, translate("server", "notify_config_info_2"), 3000, "info")
end
end)
end
for k, v in pairs(cfg.Parts) do
cfg.Prefix.Functions.CreateUseableItem(k, function(source, item)
if onlinePlayers["id:"..source].isBuilding then serverNotify(source, translate("server", "notify_config_error_1"), 3000, "error") return end
if onlinePlayers["id:"..source].hasWateringCan then serverNotify(source, translate("server", "notify_config_error_2"), 3000, "error") return end
local inLab = onlinePlayers["id:"..source].inInterior
local gotKeys = false
if inLab then
if Lab[inLab].data.cleaning then serverNotify(source, translate("server", "notify_config_info_1"), 3000, "info") return end
for _, labName in pairs(onlinePlayers["id:"..source].keys) do
if labName == inLab then
gotKeys = true
break
end
end
if not gotKeys then serverNotify(source, translate("server", "notify_config_error_3"), 3000, "error") return end
if k == "ventilation" or k == "ventilation_plus" then
local canMontage = Lab[inLab].data.ventilation.item == nil
if canMontage then
serverNotify(source, translate("server", "notify_config_info_3"), 3000, "info")
onlinePlayers["id:"..source].isBuilding = k
TriggerClientEvent("Weed:Montage_Ventilation", source, inLab)
else
serverNotify(source, translate("server", "notify_config_error_5"), 3000, "error")
end
elseif k == "heater" or k == "heater_plus" then
local canMontage = Lab[inLab].data.heater.item == nil
if canMontage then
serverNotify(source, translate("server", "notify_config_info_4"), 3000, "info")
onlinePlayers["id:"..source].isBuilding = k
TriggerClientEvent("Weed:Montage_Heater", source, inLab)
else
serverNotify(source, translate("server", "notify_config_error_6"), 3000, "error")
end
elseif k == "pot" or k == "pot_plus" then
local freePlaces = 0
for k, v in pairs(Lab[inLab].data.pots) do
if not v.item then
freePlaces = freePlaces + 1
end
end
if freePlaces == 0 then serverNotify(source, translate("server", "notify_config_error_7"), 3000, "error") return end
serverNotify(source, translate("server", "notify_config_info_5"), 3000, "info")
onlinePlayers["id:"..source].isBuilding = k
TriggerClientEvent("Weed:Montage_Pot", source, inLab)
elseif k == "watering_can" then
local canMontage = Lab[inLab].data.watering_can.capacity == nil
if canMontage then
serverNotify(source, translate("server", "notify_config_info_6"), 3000, "info")
onlinePlayers["id:"..source].isBuilding = k
TriggerClientEvent("Weed:Montage_Watering_Can", source, inLab)
else
serverNotify(source, translate("server", "notify_config_error_8"), 3000, "error")
end
elseif k == "water_bottle_big" then
local canFill = Lab[inLab].data.water_tank.capacity < cfg.Parts["water_tank"].capacity
if canFill and not Lab[inLab].fillingTank then
TriggerClientEvent("Weed:Fill_Water_Tank", source, inLab, k)
elseif not canFill then
serverNotify(source, translate("server", "notify_config_error_9"), 3000, "error")
elseif Lab[inLab].fillingTank then
serverNotify(source, translate("server", "notify_config_info_7"), 3000, "info")
end
end
else
serverNotify(source, translate("server", "notify_config_info_2"), 3000, "info")
end
end)
end
end
function Check_Item(id, itemName)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
local item = xPlayer.Functions.GetItemByName(itemName)
if item ~= nil then
return {name = itemName, amount = item.amount, label = item.label}
else
return nil
end
end
end
function Get_Name(id)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
return xPlayer.PlayerData.charinfo.firstname.." "..xPlayer.PlayerData.charinfo.lastname
end
end
function Get_Citizen(id)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
return xPlayer.PlayerData.citizenid
end
end
function Check_Cash(id)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
return xPlayer.PlayerData.money.cash
end
end
function Check_Bank_Cash(id)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
return xPlayer.PlayerData.money.bank
end
end
function Add_Cash(id, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.AddMoney('cash', amount)
end
end
function Remove_Cash(id, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.RemoveMoney('cash', amount)
end
end
function Add_Bank_Cash(id, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.AddMoney('bank', amount)
end
end
function Remove_Bank_Cash(id, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.RemoveMoney('bank', amount)
end
end
function Add_Item(id, itemName, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.AddItem(itemName, amount)
end
end
function Remove_Item(id, itemName, amount)
local xPlayer = cfg.Prefix.Functions.GetPlayer(id)
if xPlayer then
xPlayer.Functions.RemoveItem(itemName, amount)
end
end
Last updated 1 year ago
---
# Keys | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client)
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server)
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#add)
add
------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#usage)
Usage
Copy
bridge.keys.add(src, plate, hash)
* src: `number`
* plate: `string`
* hash: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#example)
Example
Copy
bridge.keys.add(src, plate, hash)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#remove)
remove
------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#usage-1)
Usage
Copy
bridge.keys.remove(src, plate, hash)
* src: `number`
* plate: `string`
* hash: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/server#example-1)
Example
Copy
bridge.keys.remove(src, plate, hash)
Last updated 1 year ago
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#getplayerdata)
getPlayerData
-------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage)
Usage
Copy
bridge.framework.getPlayerData(src)
* src: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example)
Example
Copy
bridge.framework.getPlayerData(src)
* return: `object`
* identifier: `string`
* gender: `string`
* name: `object`
* first: `string`
* last: `string`
* full: `string`
* job: `object`
* name: `string`
* label: `string`
* onDuty: `boolean`
* grade: `number`
* gradeName: `string`
* money: `object`
* cash: `number`
* bank: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#getplayerbyidentifier)
getPlayerByIdentifier
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-1)
Usage
Copy
bridge.framework.getPlayerByIdentifier(identifier)
* identifier: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-1)
Example
Copy
bridge.framework.getPlayerByIdentifier(identifier)
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#addmoney)
addMoney
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-2)
Usage
Copy
bridge.framework.addMoney(src, type, amount)
* src: `number`
* type: `"cash"` or `"bank"`
* amount: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-2)
Example
Copy
bridge.framework.addMoney(src, "bank", 50000)
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#removemoney)
removeMoney
---------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-3)
Usage
Copy
bridge.framework.removeMoney(src, type, amount)
* src: `number`
* type: `"cash"` or `"bank"`
* amount: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-3)
Example
Copy
bridge.framework.removeMoney(src, "bank", 50000)
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#createusableitem)
createUsableItem
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-4)
Usage
Copy
bridge.framework.createUsableItem(name, cb)
* name: `string`
* cb: `function`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-4)
Example
Copy
bridge.framework.createUsableItem("water", function(src)
print("Example Function")
end)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#registercommand)
registerCommand
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-5)
Usage
Copy
bridge.framework.registerCommand(name, permission, cb, data)
* name: `string`
* permission: `string`
* cb: `function`
* data(optional): `object`
* help(optional): `string`
* arguments(optional): `array`
* name: `string`
* help: `string`
* optional: `boolean`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-5)
Example
Copy
bridge.framework.registerCommand("test", "user", function(src, args)
print("Example Command")
end)
Copy
bridge.framework.registerCommand("test", "god", function(src, args)
print("src: " .. src)
print("playerId: " .. args.playerId)
print("fullname: " .. args.fullname)
end, {
help = "Example Command Help",
arguments = {
{name = "playerId", help = "Provide Player Id", optional = false},
{name = "fullname", help = "Provide Player Id Full Name", optional = true},
},
})
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#getalljobs)
getAllJobs
-------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-6)
Usage
Copy
bridge.framework.getAllJobs()
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-6)
Example
Copy
bridge.framework.getAllJobs()
* return: `object`
* jobName: `object`
* name: `string`
* label: `string`
* grades: `array`
* grade: `number`
* name: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#getjob)
getJob
-----------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#usage-7)
Usage
Copy
bridge.framework.getJob(job)
* job: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server#example-7)
Example
Copy
bridge.framework.getJob(job)
* return: `object`
* name: `string`
* label: `string`
* grades: `array`
* grade: `number`
* name: `string`
Last updated 1 year ago
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#add)
add
------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#usage)
Usage
Copy
bridge.keys.add(plate, hash)
* plate: `string`
* hash: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#example)
Example
Copy
bridge.keys.add(plate, hash)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#remove)
remove
------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#usage-1)
Usage
Copy
bridge.keys.remove(plate, hash)
* plate: `string`
* hash: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys/client#example-1)
Example
Copy
bridge.keys.remove(plate, hash)
Last updated 1 year ago
---
# Fuel | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client)
---
# Notification | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/client)
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification/server)
Last updated 1 year ago
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#registercallback)
registerCallback
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#usage)
Usage
Copy
Lib.registerCallback(event, callback, ...)
* event: `string`
* callback: `function`
* ...: `any`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#example)
Example
Copy
Lib.registerCallback("example:doubleNumber", function(src, cb, number)
local doubleNumber = number * 2
cb(doubleNumber)
end)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#deletecallback)
deleteCallback
---------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#usage-1)
Usage
Copy
Lib.deleteCallback(event, invoker)
* event: `string`
* invoker(optional): `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server#example-1)
Example
Copy
Lib.deleteCallback("example:doubleNumber")
Last updated 1 year ago
---
# Bridge | inside-scripts
copyCopychevron-down
[Frameworkchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework)
[Inventorychevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory)
[Fuelchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel)
[Keyschevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/keys)
[Notificationchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/notification)
[Progress Barchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar)
[Targetchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target)
---
# Callback | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/client)
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/server)
---
# Target | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client)
---
# Script Functionality Overview | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#concept)
Concept
---------------------------------------------------------------------------------------------------------------------------------
Our script is the perfect solution for your server. It works with virtually all types of vehicles, including Bicycles, Motorcycles, Cars, Helicopters, Airplanes, Boats, and more. Unlike other Garage Systems available on the FiveM platform, ours operates differently: there's no specific location where you must park your vehicles. Instead, you can park them anywhere on the map. Additionally, every Vehicle Owned by a Player has its unique identifier, which is the VIN Code!
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#key)
Key
-------------------------------------------------------------------------------------------------------------------------
As a Vehicle Owner, you have the ability to give and revoke keys for specified players. Importantly, players will keep these keys until you take them away. The person holding the keys has the following capabilities:
* Spawn and Despawn the vehicle even when the Owner is not on the Server
* Show the Vehicle Documents for example, to an Officer during a Routine Control
* Save the Vehicle's Parking Location
* Track the Vehicle when it is Spawned or track its Parking Location
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-card)
Vehicle Card
-------------------------------------------------------------------------------------------------------------------------------------------
Every Vehicle Owned by a Player has a Vehicle Card. The Vehicle Card can be shown to anyone within your area. This significantly enhances immersion on your Server and opens up new interaction possibilities. It's worth noting that someone without the vehicle keys cannot show the documents. The information on the card includes:
* Vehicle Name
* License Plate
* VIN Code
* Mileage
* Vehicle Owner
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#custom-license-plate)
Custom License Plate
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Our script includes a very convenient and beneficial solution for your server - automated Custom License Plates. Tebex integration with your server allows you to create a resource, such as Custom Registrations, which players can then purchase. The transaction code generated by Tebex can be used in-game, where players can enter the New License Plate details.
We also considered another solution: Vouchers. These can be created by a specific permission group. When a code is generated, it is saved in the database and copied to the clipboard. By providing this code to players, you give them the opportunity to use it in the same process.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-sale)
Vehicle Sale
-------------------------------------------------------------------------------------------------------------------------------------------
Simply provide the ID of the Player within your area and specify the Amount for which you want to sell the Vehicle. Upon pressing the button, both parties receive a Purchase and Sale Agreement Document. The agreement includes the following details:
* Seller Name
* Buyer Name
* Vehicle Name
* VIN Code
* License Plate
* Mileage
* Agreed Sale Amount
* Legal Terms and Conditions of the Sale and Purchase
If both parties agree to the sale, they just need to sign the Agreement. Once both signatures are on the document, the vehicle and the money will be transferred via Bank Transfer.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-towing)
Vehicle Towing
-----------------------------------------------------------------------------------------------------------------------------------------------
To tow a Vehicle, you need to have the appropriate job, typically a Police Officer or Mechanic. Towing starts with creating a report, setting the conditions, and signing an agreement. The agreement includes details such as:
* The Nearest Parking Lot where the Towed Vehicle will be taken
* Daily Fee for staying at the mentioned Parking Lot
* Vehicle Name
* Vehicle Owner
* VIN Code
* License Plate
Additionally, you can set a Redemption Amount for retrieving the Vehicle from the Tow Parking Lot and include a Note. The player whose Vehicle is being towed will receive information about the Person Towing the Vehicle, the Redemption Amount, and the Note. To confirm the towing of the Vehicle, we need to provide our signature, after which the Vehicle will be towed.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#tow-parking)
Tow Parking
-----------------------------------------------------------------------------------------------------------------------------------------
There are several types, and you can add even more. Each parking lot is tailored to a specific type of Vehicle, such as Boats. Each day the Vehicle is in the tow parking lot incurs a daily fee set by the server. Additionally, the person towing the vehicle can set a redemption amount and leave a note that the player can review, for example, "Parking in an unauthorized area, obstructing traffic".
Last updated 1 year ago
* [Concept](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#concept)
* [Key](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#key)
* [Vehicle Card](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-card)
* [Custom License Plate](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#custom-license-plate)
* [Vehicle Sale](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-sale)
* [Vehicle Towing](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#vehicle-towing)
* [Tow Parking](https://inside-scripts.gitbook.io/documentation/paid-scripts/garage/script-functionality-overview#tow-parking)
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#getplayerdata)
getPlayerData
-------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#usage)
Usage
Copy
bridge.framework.getPlayerData()
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#example)
Example
Copy
bridge.framework.getPlayerData()
* return: `object`
* identifier: `string`
* gender: `string`
* name: `object`
* first: `string`
* last: `string`
* full: `string`
* job: `object`
* name: `string`
* label: `string`
* onDuty: `boolean`
* grade: `number`
* gradeName: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#isloaded)
isLoaded
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#usage-1)
Usage
Copy
bridge.framework.isLoaded()
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#example-1)
Example
Copy
bridge.framework.isLoaded()
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#registercommand)
registerCommand
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#usage-2)
Usage
Copy
bridge.framework.registerCommand(name, job, cb, data)
* name: `string`
* job(optional): `array` or `string`
* name: `string`
* cb: `function`
* data(optional): `object`
* help(optional): `string`
* arguments(optional): `array`
* name: `string`
* help: `string`
* optional: `boolean`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#example-2)
Example
Copy
bridge.framework.registerCommand("test", nil, function(args)
print("Example Command")
end)
Copy
bridge.framework.registerCommand("test", {"police", "mechanic"}, function(args)
print("playerId: " .. args.playerId)
print("fullname: " .. args.fullname)
end, {
help = "Example Command Help",
arguments = {
{name = "playerId", help = "Provide Player Id", optional = false},
{name = "fullname", help = "Provide Player Id Full Name", optional = true},
},
})
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#updatejob)
updateJob
-----------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#usage-3)
Usage
Copy
RegisterNetEvent("is_bridge:updateJob", cb)
* cb: `function`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client#example-3)
Example
Copy
RegisterNetEvent("is_bridge:updateJob", function(job)
PlayerData.job = job
end)
* return: `object`
* name: `string`
* label: `string`
* onDuty: `boolean`
* grade: `number`
* gradeName: `string`
Last updated 1 year ago
---
# Library | inside-scripts
copyCopychevron-down
[Callbackchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback)
[Entitychevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity)
[Blipchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip)
[Identifierchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier)
[Timezonechevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone)
[Webhookchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook)
[Utilitychevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility)
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#get)
get
------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#usage)
Usage
Copy
bridge.fuel.get(vehicle)
* vehicle: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#example)
Example
Copy
bridge.fuel.get(vehicle)
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#set)
set
------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#usage-1)
Usage
Copy
bridge.fuel.set(vehicle, fuelLevel)
* vehicle: `number`
* fuelLevel: `float`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/fuel/client#example-1)
Example
Copy
bridge.fuel.set(vehicle, 100.0)
Last updated 1 year ago
---
# Script Functionality Overview | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#respect)
Respect
-------------------------------------------------------------------------------------------------------------------------------------
Respect is used for, among other things, purchasing subscriptions from informants, receiving wholesale orders on the Trap Phone, and determining respect among other dealers.
**It can be earned through:**
* successful price negotiations in wholesale and retail sales,
**It can be lost through:**
* unsuccessful price negotiations in wholesale and retail sales,
* failing to show up at a scheduled wholesale meeting with the client,
* leaving the wholesale meeting area with the client,
* attempting to sell the agreed-upon drug at the wholesale meeting when you don't have it or have too little of it,
* initiating an attack scenario on the client,
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#sales-skill)
Sales Skill
---------------------------------------------------------------------------------------------------------------------------------------------
Sales skills are used to increase our chances of selling drugs. For example, if we have 100 sales skill points, our chances in both wholesale and retail sales will increase by 10.0%.
**It can be earned through:**
* successful price negotiations in wholesale and retail sales,
**It can be lost through:**
* unsuccessful price negotiations in wholesale and retail sales,
* failing to show up at a scheduled wholesale meeting with the client,
* leaving the wholesale meeting area with the client,
* attempting to sell the agreed-upon drug at the wholesale meeting when you don't have it or have too little of it,
* initiating an attack scenario on the client,
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#trap-phone)
Trap Phone
-------------------------------------------------------------------------------------------------------------------------------------------
The Trap Phone is used to schedule wholesale meetings, receive messages from informants when a police officer appears in their area, check our statistics, or view active subscriptions with informants.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#moles-informants)
Moles (Informants)
---------------------------------------------------------------------------------------------------------------------------------------------------------
Informants are used to inform players who have an active subscription with them about the presence of police in their area. This is done through blips on the map and an SMS message sent to our Trap Phone. When we purchase a subscription from one of the informants, we can see the area they control in a given neighborhood on the map.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#retail-sales)
Retail Sales
-----------------------------------------------------------------------------------------------------------------------------------------------
This is regular retail sales among NPCs that we encounter on the streets. When we start an interaction with a customer, we choose the drug we want to sell to them, and then set the price at which we will sell the drug.
Example of price negotiation logic:
* Average Drug Price: **$50**
* Price Offered by Player: **$85**
* Player's Sales Skill Points: **155**
Chance of selling the drug without skill: **30%**
Chance of selling the drug with skill: **45.5%**
However, if we fail to negotiate the price with the customer or they are not interested in buying drugs, there is a certain chance that they will inform the police about the situation.
[hashtag](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#wholesale-sales)
Wholesale Sales
-----------------------------------------------------------------------------------------------------------------------------------------------------
This is wholesale sales with NPCs that we have arranged through the Trap Phone. The price negotiation logic is almost the same as in the case of retail sales. Once we agree on the terms of the sale, we need to show up at the designated location. There are several scenarios that can occur in wholesale sales:
* Normal Sale
* The player did not have the drugs or did not have the agreed quantity of drugs
* The player decided to leave the meeting area
* The player drew a weapon, which the customers perceived as an attack:
* If the player killed the customers, they have the opportunity to rob them of cash
* If the customers killed the player, they rob the player of cash
Last updated 1 year ago
* [Respect](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#respect)
* [Sales Skill](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#sales-skill)
* [Trap Phone](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#trap-phone)
* [Moles (Informants)](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#moles-informants)
* [Retail Sales](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#retail-sales)
* [Wholesale Sales](https://inside-scripts.gitbook.io/documentation/paid-scripts/sell-drugs/script-functionality-overview#wholesale-sales)
---
# Config | inside-scripts
Copy
cfg = {}
cfg.Tebex = {
invalidChars = {"!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "-", "=", "+", "`", "~", "[", "{", "]", "}", "|", ";", ":", "'", '"', ",", "<", ".", ">", "/", "?", "€", "ę", "ó", "ą", "ś", "ł", "ż", "ź", "ć", "ń"},
exactChars = false, -- Does the player have to use exactly the same number of characters as the package has?
packages = { -- The order is important; the packages are checked from top to bottom. This means that if the most expensive package is first in the order, it will be used if possible. We recommend ordering the packages from the cheapest to the most expensive!
{id = 6444649, chars = 4}, -- id = Package ID, chars = Maximum Characters
{id = 6473902, chars = 8},
},
}
cfg.Webhook = {
plate = "",
sale = "",
tow = "",
}
cfg.Garage = {
distanceUnit = "KM", -- "KM" - Kilometers, "M" - Miles
fuelUnit = "L", -- "L" - Liters, "GAL" - Galons
showDistance = true,
updateVehicleDistance = true,
personal = {
maxSharedKeys = 5,
maxSpawnedVehicles = 3,
},
job = {
["police"] = {
color = "#1E7BD0",
canBeTowed = false,
canSale = false,
canChangePlate = false,
manageMinGrade = 3,
},
["ems"] = {
color = "#FF425D",
canBeTowed = false,
canSale = false,
canChangePlate = false,
manageMinGrade = 3,
},
["mechanic"] = {
color = "#FFC527",
canBeTowed = true,
canSale = true,
canChangePlate = true,
manageMinGrade = 3,
},
},
}
cfg.Commands = {
client = {
garage = {
name = "garage",
job = nil,
},
jobgarage = {
name = "jobgarage",
job = nil, -- Don't touch that; it reads jobs from cfg.Garage.job
},
tow = {
name = "towing",
job = {"police", "mechanic"},
}
},
server = {
convert = {
name = "convertVehicles",
permission = "god",
},
voucher = {
name = "createVoucher",
permission = "god",
},
},
}
cfg.CustomVehicles = {
-- [-1032122474] = { -- vehicle hash
-- model = "benze55", -- model name
-- name = "Mercedes E55 AMG", -- display name
-- class = 1, -- vehicle class (Sedans)
-- image = {
-- src = "images/e55amg.png", -- image path source
-- -- src = "https://w7.pngwing.com/pngs/291/323/png-transparent-2009-mercedes-benz-e-class-2009-mercedes-benz-clk-class-2003-mercedes-benz-e-class-car-benz-compact-car-sedan-car.png", -- image path url
-- size = 85, -- image size
-- },
-- },
[2046537925] = {
model = "police",
name = "Vapid Police",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/police.webp",
size = 85,
}
},
[GetHashKey("police2")] = {
model = "police2",
name = "Vapid Police2",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/police2.webp",
size = 85,
}
},
[1912215274] = {
model = "police3",
name = "Vapid Police3",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/police3.webp",
size = 85,
}
},
[2321795001] = {
model = "police4",
name = "Vapid Police4",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/police4.webp",
size = 85,
}
},
[2620582743] = {
model = "police5",
name = "Vapid Police5",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/police5.webp",
size = 85,
}
},
[4260343491] = {
model = "policeb",
name = "Police Bike",
class = 1,
image = {
src = "https://docs.fivem.net/vehicles/policeb.webp",
size = 65,
}
},
}
cfg.Impound = {
vehicle = {
["Los Santos Vehicle Impound Lot"] = {
DailyParkingCharge = 200,
places = {
vector4(417.39, -1627.53, 28.67, 320.87),
vector4(419.88, -1629.35, 28.66, 319.47),
vector4(421.03, -1635.86, 28.66, 269.21),
vector4(421.12, -1638.91, 28.67, 269.53),
vector4(421.18, -1641.96, 28.66, 268.66),
vector4(418.74, -1646.57, 28.66, 229.51),
vector4(410.39, -1656.88, 28.67, 140.25),
vector4(407.91, -1654.99, 28.67, 140.19),
vector4(405.36, -1652.89, 28.67, 140.36),
vector4(402.84, -1651.01, 28.67, 140.54),
vector4(400.47, -1649.06, 28.67, 141.04),
vector4(398.13, -1646.95, 28.66, 139.84),
vector4(395.63, -1645.03, 28.67, 139.63),
},
},
},
plane = {
["Los Santos Aircraft Impound Yard"] = {
DailyParkingCharge = 500,
places = {
vector4(-1295.54, -3396.21, 14.87, 330.11),
vector4(-1281.35, -3404.43, 14.87, 329.87),
vector4(-1268.25, -3412.91, 14.89, 322.95),
},
},
},
helicopter = {
["Los Santos Helicopter Impound Pad"] = {
DailyParkingCharge = 400,
places = {
vector4(-1646.56, -3133.02, 13.37, 330.02),
vector4(-1667.8, -3137.78, 13.37, 271.75),
vector4(-1643.82, -3154.54, 13.36, 20.87),
},
},
},
boat = {
["Los Santos Boat Impound Dock"] = {
DailyParkingCharge = 300,
places = {
vector4(-791.51, -1447.85, 0.3, 143.0),
vector4(-783.19, -1437.58, 0.29, 141.25),
vector4(-773.88, -1427.33, 0.3, 138.8),
},
},
},
}
cfg.DefaultSpawn = {
vehicle = {
vector4(21.02, -876.01, 29.68, 339.16),
vector4(19.34, -880.63, 29.6, 338.95),
vector4(22.64, -881.82, 29.6, 341.58),
vector4(24.23, -877.26, 29.67, 340.0),
vector4(25.85, -883.15, 29.59, 340.77),
vector4(27.56, -878.38, 29.67, 339.33),
vector4(38.02, -887.52, 29.57, 339.61),
vector4(39.69, -882.96, 29.64, 339.1),
vector4(41.42, -888.72, 29.56, 339.94),
vector4(43.05, -884.24, 29.63, 340.01),
vector4(44.57, -889.87, 29.55, 339.9),
vector4(46.24, -885.32, 29.62, 339.93),
vector4(47.86, -891.15, 29.54, 340.58),
vector4(49.53, -886.53, 29.61, 339.79),
vector4(51.13, -892.24, 29.54, 340.39),
vector4(52.75, -887.77, 29.61, 339.68),
},
plane = {
vector4(-907.55, -3196.37, 14.59, 59.58),
vector4(-952.48, -3170.17, 14.58, 59.83),
vector4(-1002.18, -3141.44, 14.58, 60.13),
},
helicopter = {
vector4(-745.52, -1468.65, 4.39, 319.23),
vector4(-724.91, -1444.43, 4.39, 321.33),
vector4(-701.34, -1447.04, 4.39, 226.7),
vector4(-745.52, -1433.77, 4.39, 139.02),
vector4(-762.19, -1453.86, 4.39, 140.16),
vector4(-722.46, -1472.54, 4.39, 230.49),
},
boat = {
vector4(-762.49, -1372.45, -0.1, 227.65),
vector4(-767.2, -1377.54, -0.11, 228.4),
vector4(-769.85, -1379.52, -0.05, 231.95),
vector4(-773.47, -1383.81, -0.13, 231.56),
},
}
cfg.VehicleTypes = {
[0] = "automobile", -- Compacts
[1] = "automobile", -- Sedans
[2] = "automobile", -- SUVs
[3] = "automobile", -- Coupes
[4] = "automobile", -- Muscle
[5] = "automobile", -- Sports Classics
[6] = "automobile", -- Sports
[7] = "automobile", -- Super
[8] = "bike", -- Motorcycles
[9] = "automobile", -- Off-road
[10] = "automobile", -- Industrial
[11] = "automobile", -- Utility
[12] = "automobile", -- Vans
[13] = "bike", -- Cycles
[14] = "boat", -- Boats
[15] = "heli", -- Helicopters
[16] = "plane", -- Planes
[17] = "automobile", -- Service
[18] = "automobile", -- Emergency
[19] = "automobile", -- Military
[20] = "automobile", -- Commercial
[21] = nil, -- Trains
[22] = "automobile", -- Open Wheel
}
translations = json.decode(LoadResourceFile(GetCurrentResourceName(), "locales/" .. bridge.language .. ".json"))
translations = translations.lua
function translate(side, key)
if translations and translations[side] and translations[side][key] then
return translations[side][key]
end
return Lib.print("Something went wrong with translations", "error")
end
Last updated 1 year ago
---
# Framework | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/client)
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/framework/server)
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#addentity)
addEntity
--------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#usage)
Usage
Copy
bridge.target.addEntity(entity, data)
* entity: `number`
* data: `object`
* hideSquare(optional): `boolean`
* default: `false`
* checkVisibility(optional): `boolean`
* default: `true`
* showInVehicle(optional): `boolean`
* default: `false`
* distance: `float`
* squareDistance(optional): `float`
* default: `3.0`
* offset(optional): `object`
* text: `object`
* x: `float`
* default: `0.0`
* y: `float`
* default: `0.0`
* z: `float`
* default: `1.0`
* target: `object`
* x: `float`
* default: `0.0`
* y: `float`
* default: `0.0`
* z: `float`
* default: `0.0`
* options: `array`
* name: `string`
* label: `string`
* icon: `string`
* onSelect: `function`
* key(optional): `string`
* duration(optional): `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#example)
Example
Copy
bridge.target.addEntity(entity, {
distance = 2.0,
squareDistance = 5.0,
options = {
{
name = "option1",
label = "Example Option 1",
icon = "fa-solid fa-hotdog",
onSelect = function()
print("Example Function")
end
}
}
})
Copy
bridge.target.addEntity(entity, {
distance = 2.0,
squareDistance = 5.0,
hideSquare = false,
checkVisibility = false,
showInVehicle = false,
offset = {
text = {x = 0.0, y = 0.0, z = 1.0},
target = {x = 0.0, y = 0.0, z = 0.0},
},
options = {
{
name = "option1",
label = "Example Option 1",
icon = "fa-solid fa-hotdog",
onSelect = function()
print("Example Function")
end
},
{
name = "option2",
label = "Example Option 2",
icon = "fa-solid fa-hotdog",
onSelect = function()
print("Example Function")
end
}
}
})
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#removeentity)
removeEntity
--------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#usage-1)
Usage
Copy
bridge.target.removeEntity(entity, option, invoker)
* entity: `number`
* option(optional): `string`
* invoker(optional): `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/target/client#example-1)
Example
Copy
bridge.target.removeEntity(entity)
Copy
bridge.target.removeEntity(entity, "option1")
Last updated 1 year ago
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#show)
show
----------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#usage)
Usage
Copy
bridge.progressbar.show(data, finish, cancel)
* data: `object`
* duration: `number`
* title: `string`
* useWhileDead(optional): `boolean`
* canCancel(optional): `boolean`
* animation(optional): `object`
* dict: `string`
* anim: `string`
* flag: `number`
* disable(optional): `object`
* move(optional): `boolean`
* car(optional): `boolean`
* combat(optional): `boolean`
* mouse(optional): `boolean`
* sprint(optional): `boolean`
* finish: `function`
* cancel: `function`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#example)
Example
Copy
bridge.progressbar.show({
duration = 5000,
title = "Example Progress Bar",
useWhileDead = false,
canCancel = true,
}, function()
print("success")
end, function()
print("cancel")
end)
Copy
bridge.progressbar.show({
duration = 5000,
title = "Example Progress Bar",
useWhileDead = false,
canCancel = true,
animation = {
dict = "rcmnigel1c",
anim = "hailing_whistle_waive_a",
flag = 0,
},
disable = {
move = true,
car = true,
combat = true,
},
}, function()
print("success")
end, function()
print("cancel")
end)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#isactive)
isActive
------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#usage-1)
Usage
Copy
bridge.progressbar.isActive()
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#example-1)
Example
Copy
bridge.progressbar.isActive()
* return: `boolean`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#cancel)
cancel
--------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#usage-2)
Usage
Copy
bridge.progressbar.cancel()
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/progress-bar/client#example-2)
Example
Copy
bridge.progressbar.cancel()
Last updated 1 year ago
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/client#callback)
Callback
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/client#usage)
Usage
Copy
Lib.Callback(event, callback, ...)
* event: `string`
* callback: `function`
* ...: `any`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/callback/client#example)
Example
Copy
Lib.Callback("example:doubleNumber", function(response)
print("Double Number is " .. response)
end, 15)
Last updated 1 year ago
---
# Webhook | inside-scripts
copyCopychevron-down
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server)
---
# Blip | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client)
---
# Timezone | inside-scripts
copyCopychevron-down
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server)
---
# Entity | inside-scripts
copyCopychevron-down
[Clientchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client)
[Serverchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server)
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playanim)
playAnim
-------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage)
Usage
Copy
Lib.playAnim(ped, data)
* ped: `number`
* data: `object`
* isNetwork(optional): `boolean`
* default: `false`
* dict: `string`
* anim: `string`
* blendIn(optional): `float`
* default: `3.0`
* blendOut(optional): `float`
* default: `3.0`
* duration(optional): `number`
* default: `-1`
* flag(optional): `number`
* default: `49`
* playbackRate(optional): `number`
* default: `0`
* lockX(optional): `boolean`
* default: `false`
* lockY(optional): `boolean`
* default: `false`
* lockZ(optional): `boolean`
* default: `false`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playscenario)
playScenario
---------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-1)
Usage
* ped: `number`
* data: `object`
* scenario: `string`
* enterAnim(optional): `boolean`
* default: `true`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-1)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playspeech)
playSpeech
-----------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-2)
Usage
* ped: `number`
* data: `table{}`
* isNetwork(optional): `boolean`
* default: `false`
* name: `string`
* param: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-2)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#facetocoords)
faceToCoords
---------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-3)
Usage
* entity: `number`
* target: `vector3` or `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-3)
Example
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#facetocoordssmooth)
faceToCoordsSmooth
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-4)
Usage
* ped: `number`
* coords: `vector3`
* delay: `float(seconds)`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-4)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createobj)
createObj
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-5)
Usage
* hash: `string` or `number`
* coords: `vector3`
* isNetwork: `boolean`
* data(optional): `object`
* rotation(optional): `object`
* p: `float`
* r: `float`
* y: `float`
* placeOnGround(optional): `boolean`
* freeze(optional): `boolean`
* invincible(optional): `boolean`
* disableCollision(optional): `boolean`
* alpha(optional): `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-5)
Example
* return: `object`
* id: `number`
* netId: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createped)
createPed
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-6)
Usage
* hash: `string` or `number`
* coords: `vector3`
* isNetwork: `boolean`
* data(optional): `object`
* placeOnGround(optional): `boolean`
* defaultVariation(optional): `boolean`
* freeze(optional): `boolean`
* god(optional): `boolean`
* disableRagdoll(optional): `boolean`
* cannotTarget(optional): `boolean`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-6)
Example
* return: `object`
* id: `number`
* netId: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createveh)
createVeh
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-7)
Usage
* hash: `string` or `number`
* coords: `vector4`
* isNetwork: `boolean`
* data(optional): `object`
* freeze(optional): `boolean`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-7)
Example
* return: `object`
* id: `number`
* netId: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#deleteentity)
deleteEntity
---------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-8)
Usage
* entity: `number`
* invoker: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-8)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#getvehiclefullname)
getVehicleFullName
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-9)
Usage
* hash: `string` or `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-9)
Example
* return: `string`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#setentitystatebag)
setEntityStateBag
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-10)
Usage
* netId: `number`
* key: `string`
* value: `any`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-10)
Example
Last updated 1 year ago
* [playAnim](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playanim)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example)
* [playScenario](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playscenario)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-1)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-1)
* [playSpeech](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#playspeech)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-2)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-2)
* [faceToCoords](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#facetocoords)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-3)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-3)
* [faceToCoordsSmooth](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#facetocoordssmooth)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-4)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-4)
* [createObj](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createobj)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-5)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-5)
* [createPed](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createped)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-6)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-6)
* [createVeh](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#createveh)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-7)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-7)
* [deleteEntity](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#deleteentity)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-8)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-8)
* [getVehicleFullName](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#getvehiclefullname)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-9)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-9)
* [setEntityStateBag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#setentitystatebag)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#usage-10)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/client#example-10)
Copy
Lib.playAnim(ped, {
dict = "rcmnigel1c",
anim = "hailing_whistle_waive_a",
flag = 0,
})
Copy
Lib.playAnim(netId, {
isNetwork = true,
dict = "rcmnigel1c",
anim = "hailing_whistle_waive_a",
flag = 0,
})
Copy
Lib.playScenario(ped, data)
Copy
Lib.playScenario(ped, {
scenario = "WORLD_HUMAN_GUARD_STAND",
})
Copy
Lib.playSpeech(ped, data)
Copy
Lib.playSpeech(ped, {
name = "GENERIC_HI",
param = "SPEECH_PARAMS_STANDARD",
})
Copy
Lib.playSpeech(netId, {
isNetwork = true,
name = "GENERIC_HI",
param = "SPEECH_PARAMS_STANDARD",
})
Copy
Lib.faceToCoords(entity, target)
Copy
Lib.faceToCoords(entity, GetEntityCoords(PlayerPedId()))
Copy
Lib.faceToCoordsSmooth(ped, coords, delay)
Copy
Lib.faceToCoordsSmooth(ped, vector3(0.0, 0.0, 0.0), 3.0)
Copy
Lib.createObj(hash, coords, isNetwork, data)
Copy
Lib.createObj("ng_proc_coffee_01a", vector3(0.0, 0.0, 0.0), false)
Copy
Lib.createObj("ng_proc_coffee_01a", vector3(0.0, 0.0, 0.0), true, {
placeOnGround = true,
freeze = true,
invincible = true,
})
Copy
Lib.createPed(hash, coords, isNetwork, data)
Copy
Lib.createPed("a_m_y_downtown_01", vector3(0.0, 0.0, 0.0), false)
Copy
Lib.createPed("a_m_y_downtown_01", vector3(0.0, 0.0, 0.0), false, {
placeOnGround = true,
defaultVariation = true,
freeze = true,
god = true,
})
Copy
Lib.createVeh(hash, coords, isNetwork, data)
Copy
Lib.createVeh("sultanrs", vector3(0.0, 0.0, 0.0), false)
Copy
Lib.createVeh("sultanrs", vector3(0.0, 0.0, 0.0), false, {
freeze = true,
})
Copy
Lib.deleteEntity(entity, invoker)
Copy
Lib.deleteEntity(entity)
Copy
Lib.getVehicleFullName(hash)
Copy
Lib.getVehicleFullName(hash)
Copy
Lib.setEntityStateBag(netId, key, value)
Copy
local veh = GetVehiclePedIsIn(PlayerPedId(), false)
if veh ~= 0 then
Lib.setEntityStateBag(NetworkGetNetworkIdFromEntity(veh), someoneInVehicle, true)
end
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#getidentifiers)
getIdentifiers
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#usage)
Usage
Copy
Lib.getIdentifiers(src)
* src: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#example)
Example
Copy
Lib.getIdentifiers(src)
* return: `object`
* steam: `string`
* discord: `string`
* license: `string`
* xbl: `string`
* live: `string`
* fivem: `string`
Last updated 1 year ago
* [getIdentifiers](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#getidentifiers)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/identifier/server#example)
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#getnearbyplayers)
getNearbyPlayers
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#usage)
Usage
Copy
Lib.getNearbyPlayers(coords, maxDistance)
* coords: `vector3`
* maxDistance: `float`
* default: `10.0`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#example)
Example
Copy
Lib.getNearbyPlayers(vector3(0.0, 0.0, 0.0), 15.0)
* return: `array`
* id: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#setentitystatebag)
setEntityStateBag
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#usage-1)
Usage
Copy
Lib.setEntityStateBag(netId, key, value)
netId: `number`
key: `string`
value: `any`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#example-1)
Example
Last updated 1 year ago
* [getNearbyPlayers](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#getnearbyplayers)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#example)
* [setEntityStateBag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#setentitystatebag)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#usage-1)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/entity/server#example-1)
Copy
local playerPed = GetPlayerPed(source)
if playerPed then
Lib.setEntityStateBag(NetworkGetNetworkIdFromEntity(playerPed), playerExist, true)
end
---
# Client | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#createblip)
createBlip
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage)
Usage
Copy
Lib.createBlip(coords, data)
* coords: `vector3`
* data(optional): `object`
* sprite(optional): `number`
* default: `1`
* display(optional): `number`
* default: `2`
* scale(optional): `float`
* default: `0.6`
* color(optional): `number`
* default: `1`
* alpha(optional): `number`
* default: `255`
* shortRange(optional): `boolean`
* default: `false`
* name(optional): `string`
* default: `"Example Blip"`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example)
Example
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#createblipradius)
createBlipRadius
---------------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage-1)
Usage
* coords: `vector3`
* data(optional): `object`
* radius(optional): `float`
* default: `50.0`
* color(optional): `number`
* default: `1`
* alpha(optional): `number`
* default: `255`
* shortRange(optional): `boolean`
* default: `false`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example-1)
Example
* return: `number`
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#removeblip)
removeBlip
---------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage-2)
Usage
* blip: `number`
* invoker: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example-2)
Example
Last updated 1 year ago
* [createBlip](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#createblip)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example)
* [createBlipRadius](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#createblipradius)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage-1)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example-1)
* [removeBlip](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#removeblip)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#usage-2)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/blip/client#example-2)
Copy
Lib.createBlip(vector3(0.0, 0.0, 0.0), {
sprite = 400,
scale = 0.8,
color = 28,
name = "Test",
})
Copy
Lib.createBlipRadius(coords, data)
Copy
Lib.createBlipRadius(vector3(0.0, 0.0, 0.0), {
radius = 25.0,
color = 28,
})
Copy
Lib.removeBlip(blip, invoker)
Copy
Lib.removeBlip(blip)
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#getdate)
getDate
-------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#usage)
Usage
Copy
Lib.getDate(time, data)
* time: `number`
* data(optional): `object`
* unit: `"s"` - seconds or `"m"` - minutes or `"h"` - hours or `"d"` - days or `"w"` - weeks
* count: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#example)
Example
Copy
Lib.getDate(os.time())
Copy
Lib.getDate(os.time(), {
unit = "h",
count = 6,
})
* return: `object`
* time: `number`
* date: `string`
Last updated 1 year ago
* [getDate](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#getdate)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/timezone/server#example)
---
# Utility | inside-scripts
copyCopychevron-down
[Sharedchevron-right](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/utility/shared)
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#sendwebhook)
sendWebhook
--------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#usage)
Usage
Copy
Lib.sendWebhook(url, data)
* url: `string`
* data: `object`
* color(optional): `string(hex)`
* timestamp(optional): `boolean`
* content(optional): `string`
* title(optional): `string`
* url(optional): `string`
* author(optional): `object`
* name(optional): `string`
* icon\_url(optional): `string`
* url(optional): `string`
* description(optional): `string`
* thumbnail(optional): `object`
* url: `string`
* fields(optional): `array`
* name: `string`
* value: `string`
* inline: `boolean`
* image(optional): `object`
* url: `string`
* footer(optional): `object`
* text(optional): `string`
* icon\_url(optional): `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#example)
Example
Last updated 1 year ago
* [sendWebhook](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#sendwebhook)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/library/webhook/server#example)
Copy
Lib.sendWebhook("discord_webhook_url", {
color = "#00f0be",
timestamp = true,
title = "Test",
content = "@everyone",
})
---
# Server | inside-scripts
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#additem)
addItem
-------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage)
Usage
Copy
bridge.inventory.addItem(src, name, amount)
* src: `number`
* name: `string`
* amount: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example)
Example
Copy
bridge.inventory.addItem(src, "water", 5)
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#removeitem)
removeItem
-------------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage-1)
Usage
Copy
bridge.inventory.removeItem(src, name, amount)
* src: `number`
* name: `string`
* amount: `number`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example-1)
Example
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#hasitem)
hasItem
-------------------------------------------------------------------------------------------------------------------------------------------------
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage-2)
Usage
* src: `number`
* name: `string`
###
[hashtag](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example-2)
Example
* return: `object`
* label: `string`
* count: `number`
Last updated 1 year ago
* [addItem](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#additem)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example)
* [removeItem](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#removeitem)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage-1)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example-1)
* [hasItem](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#hasitem)
* [Usage](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#usage-2)
* [Example](https://inside-scripts.gitbook.io/documentation/free-scripts/bridge-and-library/functions/bridge/inventory/server#example-2)
Copy
bridge.inventory.removeItem(src, "water", 5)
Copy
bridge.inventory.hasItem(src, name)
Copy
bridge.inventory.hasItem(src, "water")
---