GithubHelp home page GithubHelp logo

it-scripts / it-drugs Goto Github PK

View Code? Open in Web Editor NEW
34.0 1.0 22.0 282 KB

Become a master herbalist with this drug script! Ready for qb-core and esx!

Home Page: https://docs.allroundjonu.net/scripts/it-drugs

License: GNU General Public License v3.0

Lua 100.00%
esx-fivem esx-legacy fivem qbcore-script drug oxlib

it-drugs's Introduction

Drugs Banner

Discord Downloads Version License

it-drugs is a drug script for FiveM, offering a fully immersive and interactive drug economy. With the ability to grow unlimited plants, players can dive deep into cultivation. The script features processing tables for transforming raw materials into high-value drugs, and growth speed zones that add a strategic layer to farming. Selling drugs to NPCs creates a dynamic market environment, enhancing the overall gameplay. Fully configurable, it-drugs allows server admins to customize every aspect to fit their unique needs, making it an essential addition to any FiveM server.

Supported Frameworks

Suported Inventorys

| Supported 🔧 | Pending | Not Supported

Dependencys

  • Please use only one

Drugs Features Banner

🌱 | Planting

Our script offers a unique planting system that allows players to grow unlimited plants (or a set max amount in the config). With the ability to plant seeds, players can cultivate their own plants and harvest them for raw materials. Our planting system makes the complete map a potential farm, allowing players to grow plants in any location they choose (Soil/Ground check can be enabled in the config). Optional growth speed zones add a strategic layer to farming, making it a fun and engaging experience.

🧪 | Processing Tables

Our script features processing tables that allow players to transform raw materials into high-value drugs. Players can use these tables to create drugs themselves, adding a layer of complexity to the drug economy. The Tables can be placed anywhere on the map, making it easy for players to process their materials and create drugs. Every table can be configured in the config file, allowing server admins to customize the experience to fit their unique needs.

💰 | Selling Drugs to NPCs

Our script allows players to sell drugs to NPCs, creating a dynamic market environment. Players can sell their drugs to NPCs for a profit, enhancing the overall gameplay. This feature adds a layer of realism to the drug economy, making it a fun and engaging experience for players. The selling prices on selling zones can be configured in the config file.

🚬 | Takeable Drugs

Our script offers takeable drugs that players can consume for various effects. Players can take drugs to enhance their gameplay experience, adding a layer of realism to the drug economy. The effects of the drugs can be configured in the config file.

📊 | Ingame Admin Menu

Our script features an ingame admin menu that allows server admins to manage drugs and tables. Admins can use the menu view and manage all drugs and tables on the server, making it easy to keep track of everything. The admin menu can be accessed by typing /drugadmin [plants/tables] in the chat.

🔧 | Fully Configurable

Our script is fully configurable, allowing server admins to customize every aspect to fit their unique needs. From growth speed zones to selling prices, every aspect of the script can be configured in the config file.

Drugs Documentation Banner

You can find the install guide in the documentation



Legal Notices

it-drugs (it-scripts)

Copyright (C) 2024 it-scripts

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/

it-drugs's People

Contributors

allroundjonu avatar misterbuzzee avatar xsamivs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

it-drugs's Issues

[FEATURE REQUEST]: need to check the distance between one plant and another

Is your feature request related to a problem? Please describe.

you may need to check the distance between one plant and another,
double

Describe the solution you'd like

you can give a distance of 1.5 to 2 meters, players can only plant at a distance of <= 1.5 to 2 meters

Describe alternatives you've considered

for _, existingCoords in ipairs(plantCoordinates) do
local distance = #(coords - existingCoords)
if distance < 2.0 then
ShowNotification(nil, _U('NOTIFICATION__TOO_CLOSE'), "error")
DeleteObject(plant)
return
end
end

Additional context

No response

[BUG REPORT]:

Version of the Script

1.22

Describe the bug

Unable to sell any drugs after adding other drugs to the drugs/items list.
Using QBCORE with ox_inventory
The check for checking if the player has an item doesn't pick up the items, even if you have the original items on you, these are not picked up, the Notificat:
if playerItems == 0 then
ShowNotification(nil, _U('NOTIFICATION__NO__DRUGS'), 'error')
SetPedAsNoLongerNeeded(entity)
return
end

Is called each and every time.

To Reproduce

Add these to the config, in both or one location:
        drugs = {
            { item = 'cocaine', price = math.random(80, 120)},
            { item = 'joint', price = math.random(10, 30)},
            { item = 'weed_white-widow', price = math.random(20, 75)},
            { item = 'marijuana', price = math.random(20, 100)},
            { item = 'methbaggy', price = math.random(110, 150)},
            { item = 'weed_og-kush', price = math.random(50, 100)},
            { item = 'weed_skunk', price = math.random(50, 100)},
            { item = 'weed_amnesia', price = math.random(50, 100)},
            { item = 'weed_purple-haze', price = math.random(50, 100)},
            { item = 'weed_ak47', price = math.random(50, 100)},
            { item = 'crack_baggy', price = math.random(180, 340)},
            { item = 'cokebaggy', price = math.random(200, 400)},
            { item = 'heroin', price = math.random(250, 500)},
            { item = 'methbaggy', price = math.random(200, 300)},
            { item = 'meth', price = math.random(300, 350)},
            { item = 'puremethbaggy', price = math.random(300, 350)},
            { item = 'coke_brick', price = math.random(3000, 5000)},
            { item = 'shroombag', price = math.random(150, 250)},
            { item = 'weed_lemonhaze', price = math.random(20, 75)}
        }
    },

Doesn't matter if you restart the whole server or the single script ... there is no means to walk up to a ped and sell.

Relevant log output

No errors generated, the trigger for having nothing on you to sell is called.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.