ESX/QBCore Pocket Bike - bicycles can be used from the inventory

Buy
Preview

lv_bikes

This script adds three usable bicycles to the inventory of the ESX/QBCore framework. Players can use these bicycles from their inventory to spawn them. When a player dismounts from the bicycle, they receive a notification that the bicycle will be deleted if they do not get back on within 10 seconds. After 10 seconds, the bicycle will be deleted if the player has not gotten back on.

Features:

  1. Three Usable Bicycles:
  • BMX Bike
  • Mountain Bike
  • Road Bike
  1. Bicycle Spawning:
  • Players can use bicycles from their inventory to spawn them.
  • The spawned bicycle will appear directly under the player, and the player will be placed on it.
  1. Automatic Bicycle Removal:
  • When a player dismounts from the bicycle, they receive a notification.
  • The bicycle will be deleted after a configurable time period (default is 10 seconds) if the player does not get back on.
  1. Configurable Settings:
  • The vehicle models and the time period for automatic removal can be adjusted in the config.lua file.

SQL ESX

INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('bike1', 'BMX Bike', 1, 0, 1);
INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('bike2', 'Mountain Bike', 1, 0, 1);
INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('bike3', 'Road Bike', 1, 0, 1);

SQL QBCore

INSERT INTO `shared` (`name`, `label`, `weight`, `type`, `image`, `unique`, `useable`, `shouldClose`, `combinable`, `description`) VALUES
('bike1', 'BMX Bike', 1, 'item', 'bmx.png', 0, 1, 1, NULL, 'A BMX bike.'),
('bike2', 'Mountain Bike', 1, 'item', 'mountainbike.png', 0, 1, 1, NULL, 'A Mountain bike.'),
('bike3', 'Road Bike', 1, 'item', 'roadbike.png', 0, 1, 1, NULL, 'A Road bike.');

config.lua

Config = {}
Config.Framework = 'ESX' -- Change to 'QBCore' if you are using QBCore
Config.Language = 'en' -- 'en' für Englisch, 'de' für Deutsch
Config.Bikes = {
    bike1 = {model = 'bmx', label = 'BMX Bike'},
    bike2 = {model = 'scorcher', label = 'Mountain Bike'},
    bike3 = {model = 'tribike', label = 'Road Bike'}
}
Config.DeletionDelay = 10000 -- Time span in milliseconds (10 seconds)

Config.Messages = {
    en = {
        bike_spawned = "You have spawned a ",
        bike_despawn_warning = "You have dismounted. Your bike will be deleted in ",
        bike_despawned = "Your bike was deleted because you did not remount within ",
        seconds = " seconds.",
    },
    de = {
        bike_spawned = "Du hast ein ",
        bike_despawn_warning = "Du bist abgestiegen. Dein Fahrrad wird in ",
        bike_despawned = "Dein Fahrrad wurde gelöscht, weil du nicht innerhalb von ",
        seconds = " Sekunden wieder aufgestiegen bist.",
    }
}

my works
LV Refuel
LV Bikes
LV Speedlimiter

Code is accessible No only Config
Subscription-based No
Lines (approximately) >50 lines
Requirements ESX/QBcore
Support Yes
1 Like

Escrowed files contain German localization, this can be unexpected on an English forum

Looks a lot like this one

1 Like

You’re right, but my script was written by myself for my server. didn’t even know the script