Street, wifi and vending
Eleven Comercios config for FiveM: street carts, the food truck, wifi, and public and business vending machines, with licenses, levels, caps, zones and thefts.
Options in eleven-comercios/config.lua for what a business does outside its premises. How each feature is used: Street sales.
Note
RequiredLevel uses the internal numbering: 2 is Level 1 on the tablet and 3 is Level 2.
Important
The street sales, wifi and vending licenses are added to the catalog the first time a business reaches their level, using the cost and duration in this file and the name from the language files. If you change those values here later, the license that already exists doesn't change: edit it in the panel (Catalogs → Licenses).
Street sales (carts)
Config.StreetVending:
| Key | Default | What it does |
|---|---|---|
LicenseKey | 'venta_ambulante' | License key. |
RequiredLevel | 2 | Internal level from which it can be bought. |
LicenseName / LicenseDescription | not set | License texts. When not set, the ones in locales/ are used (license.venta_ambulante.name / .desc). |
LicenseCost | 5000 | Cost, charged to the business account. |
LicenseDurationDays | 3650 | Duration in days (about 10 years). |
MaxCarts | 2 | Carts per business. |
CartStashSlots / CartStashWeight | 30 / 100000 | Inventory size of each cart. |
InteractDistance | 2.5 | Distance to buy at the cart. |
Models | 6 models | Models the owner can choose: { model, label }. |
Models = {
{ model = 'prop_hotdogstand_01', label = 'Hot dog cart' },
{ model = 'prop_burgerstand_01', label = 'Burger cart' },
{ model = 'prop_pier_kiosk_01', label = 'Pier kiosk' },
{ model = 'prop_juicestand', label = 'Juice stand' },
{ model = 'prop_bbq_5', label = 'Street barbecue' },
{ model = 'prop_fruitstand_b', label = 'Fruit stand' },
},
The label values ship in English: translate them right here if your server uses another language. The same goes for KitchenLabel, the Config.Vending products and the Config.VendingOwned models.
Food truck
Config.FoodTruck:
| Key | Default | What it does |
|---|---|---|
Models | { 'taco' } | Vehicle models that count as a food truck. They must be in the panel's fleet catalog. |
RequiredLevel | 3 | Internal level to buy and set it up. It also needs the street sales license. |
MaxPerBusiness | 1 | Food trucks per business and stands set up at once. |
InteractDistance | 3.0 | Target distance on the van. |
NearDistance | 7.0 | How far counts as "at the stand". |
MaxMoveDistance | 4.0 | If the van moves this far from where it was set up, the stand packs up. |
DeployTime | 5000 | Progress bar milliseconds when setting up. |
KitchenSlotBase | 100 | Base number of the truck's oven, so it doesn't clash with the premises ovens. |
KitchenLabel | 'Kitchen' | Kitchen name. |
Storage | 25 / 150000 | Slots and weight of the truck's storage. |
Till | 10 / 30000 | Slots and weight of the truck's till. |
Wifi
Config.Wifi (only with eleven-phone; without it, the wifi license is neither offered nor sold):
| Key | Default | What it does |
|---|---|---|
LicenseKey | 'wifi' | License key. |
RequiredLevel | 2 | Internal level from which it can be bought. |
LicenseName / LicenseDescription | not set | License texts; when not set, the ones in locales/. |
LicenseCost | 10000 | Cost. |
LicenseDurationDays | 90 | Duration in days. |
MaxPoints | 2 | Wifi points per business. |
Radius | 15.0 | Coverage radius in meters around each point. |
Public vending machines
Config.Vending: the machines on the map, with no owner.
| Key | Default | What it does |
|---|---|---|
Price | 45 | Price of any product (card only). |
ReuseCooldown | 15 * 60 | Seconds before another unit of the same product can be bought. |
ActionDebounce | 2 | Seconds between actions, to prevent double charges. |
JamAnim | kick | Jam animation: dict, clip, durationMs, impactMs. |
EasterEggFirstKick | true | Each character's first jam drops the product anyway. |
Models | 6 models | Props that get the vending interaction. |
Exclude | {} | Specific machines that shouldn't get the option: { model, coords, radius }. |
Products | water, burger, Sprunk | Catalog: { item, label, slot }. |
Warning
The items in Products (water, burger, sprunk by default) must exist in your ox_inventory.
Business vending machines
Config.VendingOwned:
| Key | Default | What it does |
|---|---|---|
LicenseKey | 'expendedoras' | License key. |
LicenseName / LicenseDescription | not set | License texts; when not set, the ones in locales/. |
RequiredLevel | 2 | Internal level from which it can be bought. |
LicenseCost | 7500 | Cost. |
LicenseDurationDays | 3650 | Duration in days. |
Base / PerLevel | 1 / 0 | Machines at the required level and extra per level. |
StashSlots / StashWeight | 20 / 60000 | Inventory of each machine. |
InteractDistance | 2.0 | Distance to use it. |
MaxUnitPrice | 500 | Max price per unit. |
PlaceMaxDistance | 8.0 | The owner must be this close to where they place it. |
MinDistanceBetween | 12.0 | Minimum distance between business machines. |
OtherBusinessRadius | 20.0 | Minimum distance from another business's points. |
NoPlaceZones | police stations, hospitals, city hall | Forbidden zones: { coords, radius, label }. Adjust them to your map. |
AllowFoodAndDrink | true | Allows selling every food and drink item in ox_inventory. |
ExtraItems / DeniedItems | {} / {} | Items added to or removed from what can be sold. |
CashInMachine | true | Takings stay in the machine until an employee collects them. false = straight to the account. |
CashCap | 5000 | With this much cash inside, the machine stops selling. |
ConcessionFee | 2500 | Cost of taking over a public machine. |
Models | 6 models | Models the owner can choose: { model, label }. |
Robberies
Config.VendingOwned.Robbery:
| Key | Default | What it does |
|---|---|---|
Enabled | true | Turns robberies on. |
Item | 'lockpick' | Required tool. |
Minigame | lockpick | eleven-minijuegos mini-game (without it, ox_lib's skillCheck). |
Stages | 3 | Rounds of mini-game and struggling. |
LootItem | 'money' | Item the thief receives. |
BreakChance | 25 | % chance the tool breaks. |
MinCash | 200 | Minimum takings for the machine to be forceable. |
LootPercent | 80 | % of the takings the thief gets. |
PoliceJob | 'police' | Job that counts as police for MinPolice. |
MinPolice | 2 | On-duty police required. |
Cooldown | 60 * 60 | Seconds between robberies of the same machine. |
PlayerCooldown | 15 * 60 | Seconds between robberies by the same player. |
Duration | 45000 | Milliseconds of struggling per round. |
BuyerLockout | 30 * 60 | Seconds a player who just bought from it can't force it. |
AlertChance | 100 | % chance of a police alert. |
Alert to your dispatch
With eleven-police running, the alert shows up in its dispatch. With any other dispatch, listen to the eleven-comercios:vendingRobberyAlert server event, fired every time the alert goes off:
AddEventHandler('eleven-comercios:vendingRobberyAlert', function(src, coords, cartId)
-- src: player forcing the machine · coords: vector3 · cartId: machine id
-- call your dispatch script here
end)