
📱Envi-Trap-Phone
Envi-Trap-Phone Official Documentation
Prerequisites
Explanation of Features
The majority of explanation that you need will be found in the comments of 7 shared config files. We try to leave as much information as possible to help with the set-up process. Below are some guides to things that may not be explainable via a few comments
Scales for Drug Weights
The scales system in this drug script allows for flexible and realistic drug weight conversions. Here's how it works:
Matching Labels: The 'label' field must match across all weight types for a specific drug. For example, all cocaine-related items should have the label 'Coke'.
Weight Hierarchy: The system supports four weight types: 'gram', 'quarter-ounce', 'ounce', and 'kilo'.
Setting Up Weight Types: Include all weight types up to the highest weight you want to use for each drug. For example:
If you want to allow up to kilos of cocaine, you need entries for 'gram', 'quarter-ounce', 'ounce', and 'kilo'.
If you only want up to quarter-ounces of meth, you'd only need 'gram' and 'quarter-ounce'.
Item Names: The actual item names (like 'cokebaggy', 'meth_7g', etc.) can be set to whatever fits your server's naming conventions.
Amount Type: The 'amountType' field specifies which weight category that particular item represents.
XP/Special Contacts System
How It Works
The XP system in Envi-Trap-Phone is secret—players won’t know their exact XP or level, creating a more organic and immersive experience. The system is designed so that special contacts are met naturally during gameplay, and these NPCs are picked at random for each player. This adds an exciting layer of unpredictability, making it feel as though every player has a unique playthrough with different connections and relationships throughout the city. No two players will have the exact same experience, as their paths to meeting contacts will vary.
Gaining and Losing XP
Each drug in the system has its own XP tied to the specific trap phone being used. Your "level" is phone-specific, meaning progression is not tied to the player but to the individual phone.
As you sell drugs to NPCs, you’ll gain or lose XP in the drug you're selling, based on the outcome of the transaction. The higher your level, the harder it becomes to earn XP, making progression more challenging over time.
Leveling Up
To level up, you need 1000 x (your current level) XP in a specific drug. As you level up, the XP requirements increase:
At Level 1, you need 1000 XP in a drug to level up.
At Level 5, you need 5000 XP in a drug to level up.
This pattern continues, with XP becoming more difficult to earn as your level increases.
Special Contacts
Once you reach the required XP for leveling up, there's a chance you'll encounter a new special contact while selling drugs. This chance can be adjusted using the Config.SpecialContactChance
setting, allowing you to fine-tune progression speed.
What Happens When You Level Up
Upon leveling up, one of two things will happen:
You may receive a text message from the special contact introducing themselves.
A special contact NPC may spawn and approach you like a normal buyer. After the sale, they will introduce themselves.
To interact with these special contacts, you must have their number on a legitimate phone. Simply saving their number from someone else won’t work. Once you’ve obtained the contact through the phone, they’ll be available for various benefits.
Types of Special Contacts
Currently, there are three special contacts available:
The Plug:
Sells large quantities of drugs directly to the player.
Zone Info Contact:
Provides detailed information about any zone when called.
Gang Leader:
Influences gang relationships and offers unique opportunities based on gang dynamics.
Future Updates
More special contacts will be added in future updates, making it feel like new characters are entering your world rather than just a script update. Players will experience moments like, "Have you met that new guy in town?" with each new contact introduced.
Example of layout for one drug type
['cokebaggy'] = {-- Change this to item name
label = 'Coke', -- MUST MATCH OTHER QUANTITIES IN amountType
basePrice = 125,
minPrice = 100,
maxPrice = 150,
maxSale = 5,
amountType = 'gram', -- Type of amount (gram, quarter-ounce, ounce, kilo) -- See docs for more info on Scales and Quantities
-- Prop Settings
prop = 'p_meth_bag_01_s',
propOffset = vec3(0.0, 0.0, 0.0),
propRot = vec3(0.0, 320.0, 0.0),
-- Animation Settings
largePackage = false, -- if the prop is a large package or not (to choose the correct animation)
highDemandZones = {0, 1, 2, 3}, -- Zones where the drug is in high demand -- See zoneSettings.lua for ZoneWealth
-- NEW --
soldToNpcs = true, -- If true, the drug can be sold to NPCs
timeBetweenSales = 30, -- Time in SECONDS until the next sale can be made
},
['coke_7g'] = {-- Change this to item name
label = 'Coke', -- MUST MATCH OTHER QUANTITIES IN amountType
basePrice = 850,
minPrice = 700,
maxPrice = 1050,
maxSale = 3,
amountType = 'quarter-ounce', -- Type of amount (gram, quarter-ounce, ounce, kilo) -- See docs for more info on Scales and Quantities
-- Prop Settings
prop = 'p_meth_bag_01_s',
propOffset = vec3(0.0, 0.0, 0.0),
propRot = vec3(0.0, 320.0, 0.0),
-- Animation Settings
largePackage = false, -- if the prop is a large package or not (to choose the correct animation)
highDemandZones = {1, 2, 3}, -- Zones where the drug is in high demand -- See zoneSettings.lua for ZoneWealth
-- NEW --
soldToNpcs = false, -- If true, the drug can be sold to NPCs
timeBetweenSales = 60, -- Time in SECONDS until the next sale can be made
},
['coke_1oz'] = {-- Change this to item name
label = 'Coke', -- MUST MATCH OTHER QUANTITIES IN amountType
basePrice = 3500,
minPrice = 2800,
maxPrice = 4200,
maxSale = 2,
amountType = 'ounce', -- Type of amount (gram, quarter-ounce, ounce, kilo) -- See docs for more info on Scales and Quantities
-- Prop Settings
prop = 'hei_prop_hei_drug_pack_01b',
propOffset = vec3(0.0, -0.05, -0.1),
propRot = vec3(0.0, -0.05, 0.0),
-- Animation Settings
largePackage = true,
highDemandZones = {2, 3, 4}, -- Zones where the drug is in high demand -- See zoneSettings.lua for ZoneWealth
-- NEW --
soldToNpcs = false, -- If true, the drug can be sold to NPCs
timeBetweenSales = 90, -- Time in SECONDS until the next sale can be made
},
['coke_brick'] = {-- Change this to item name
label = 'Coke', -- MUST MATCH OTHER QUANTITIES IN amountType
basePrice = 350000,
minPrice = 397600,
maxPrice = 596400,
maxSale = 2,
amountType = 'kilo', -- Type of amount (gram, quarter-ounce, ounce, kilo) -- See docs for more info on Scales and Quantities
-- Prop Settings
prop = 'hei_prop_hei_drug_pack_01b',
propOffset = vec3(0.0, -0.05, -0.1),
propRot = vec3(0.0, -0.05, 0.0),
-- Animation Settings
largePackage = true,
highDemandZones = {2, 3, 4}, -- Zones where the drug is in high demand -- See zoneSettings.lua for ZoneWealth
-- NEW --
soldToNpcs = false, -- If true, the drug can be sold to NPCs
timeBetweenSales = 120, -- Time in SECONDS until the next sale can be made
},
Example of plug setup
Plugs need unqiue identifiers for a few different things.
Name
Ped Model
Number
SpecialItem (gotten from your Config.Drugs section)
SpecialLabel (gotten from your Config.Drugs section)
Special Item Label
SpecialItemAmount (gotten from your Config.Drugs section)
[1] = {
name = 'Cletus', -- Name of the contact
pedModel = 'ig_cletus',
faceVariation = false,
number = '55501281415',
special = 'plug', -- 'plug' or 'zone_info or 'gang_leader' -- [ MORE COMING SOON! ] --
gang = nil,
specialItem = 'weed_brick',
specialLabel = 'Weed',
specialItemLabel = 'Kilos of Weed',
specialItemAmount = 'kilo',
specialMax = 1,
specialPrice = 200000,
},
[2] = { -- EXAMPLE OF A PLUG CONTACT
name = 'Rashkovsky', -- Name of the contact
pedModel = 'ig_rashcosvki',
faceVariation = false,
number = '55501481426',
special = 'plug', -- 'plug' or 'zone_info or 'gang_leader' -- [ MORE COMING SOON! ] --
gang = nil,
specialItem = 'coke_brick',
specialLabel = 'Coke',
specialItemLabel = 'Kilos of Coke',
specialItemAmount = 'kilo',
specialMax = 1,
specialPrice = 270000,
},
[3] = {
name = 'Salton', -- Name of the contact
pedModel = 'a_m_m_salton_03',
faceVariation = false,
number = '55508235124',
special = 'plug', -- 'plug' or 'zone_info or 'gang_leader' -- [ MORE COMING SOON! ] --
gang = nil,
specialItem = 'meth_brick',
specialLabel = 'Meth',
specialItemLabel = 'Kilos of Meth',
specialItemAmount = 'kilo',
specialMax = 1,
specialPrice = 340000,
},
Inventory Setup
Ox_Inventory
["trap_phone"] = {
label = 'Trap Phone',
description = 'Trap-Line Bling...',
weight = 100,
stack = false,
close = true,
},
["scales"] = {
label = 'Scales',
description = 'Great for weighing things',
weight = 50,
stack = false,
close = true,
},
["batteries"] = {
label = 'AAA Batteries',
description = 'Extra long life',
weight = 20,
stack = true,
close = true,
},
OLD QB-Inventory Layout
["trap_phone"] = {
name = 'trap_phone',
label = 'Trap Phone',
weight = 100,
type = 'item',
image = 'trap_phone.png',
unique = true,
shouldClose = true,
combinable = nil,
description = 'Trap-Line Bling...'
},
["scales"] = { ]
name = 'scales',
label = 'Scales',
weight = 50,
type = 'item',
image = 'scales.png',
unique = true,
shouldClose = true,
combinable = nil,
description = 'Great for weighing things'
},
["batteries"] = {
name = 'batteries',
label = 'AAA Batteries',
weight = 20,
type = 'item',
image = 'batteries.png',
unique = false,
shouldClose = true,
combinable = nil,
description = 'Extra long life'
},
NEW QB-Inventory Layout
trap_phone = { name = 'trap_phone', label = 'Trap Phone', weight = 100, type = 'item', image = 'trap_phone.png', unique = true, shouldClose = true, combinable = nil, description = 'Trap-Line Bling...' },
scales = { name = 'scales', label = 'Scales', weight = 50, type = 'item', image = 'scales.png', unique = true, shouldClose = true, combinable = nil, description = 'Great for weighing things' },
batteries = { name = 'batteries', label = 'AAA Batteries', weight = 20, type = 'item', image = 'batteries.png', unique = false, shouldClose = true, combinable = nil, description = 'Extra long life' },
QS-Inventory
trap_phone = { name = 'trap_phone', label = 'Trap Phone', useable = true, weight = 100, type = 'item', image = 'trap_phone.png', unique = true, shouldClose = true, combinable = nil, description = 'Trap-Line Bling...' },
scales = { name = 'scales', label = 'Scales', weight = 50, type = 'item', useable = true, image = 'scales.png', unique = true, shouldClose = true, combinable = nil, description = 'Great for weighing things' },
batteries = { name = 'batteries', label = 'AAA Batteries', useable = true, weight = 20, type = 'item', image = 'batteries.png', unique = false, shouldClose = true, combinable = nil, description = 'Extra long life' },
Config.lua
Preview file for config.lua
DialogSettings.lua
Preview file for dialogSettings.lua
ExtraServicesConfig
Preview file for extraServices.lua
GangZoneSettings
Preview file for gangZoneSettings.lua
LanguageSettings
Preview file for languaeSettings.lua
PersonalitySettings
Preview file for personalitySettings.lua
SpecialContactSettings
Preview file for specialContactSettings.lua
Last updated