Coder Social home page Coder Social logo

slimchances / qb-gathering Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darknight2590/qb-gathering

0.0 0.0 0.0 20 KB

This is a basic gathering/farming script made for QB-Core to give a certain amount of items to a player after he interacts on one of the gathering locations.

Lua 100.00%

qb-gathering's Introduction

This is a basic gathering/farming script made for QB-Core to give a certain amount of items to a player after he interacts on one of the gathering locations.

Features :

  • Localisable
  • Extensive configuration file
  • Multiple gathering locations
  • Spawns a specified model on the gathering location

You can also copy/paste the folder and rename it to create a new type of farming/gathering location (since everything is configurable in config.lua)

Screenshot
image
image

Config = {}

-- WHICH ITEM TO GIVE
Config.itemname  = "weed_skunk" -- Item name in shared.lua, Example : cocaleaf

-- TRANSLATION TEXT
Config.itemlabel = "Weed" -- Example : Cocaine leaf
Config.gathertext = "Gather" -- Example : Gather
Config.gatheringtext = "Gathering" -- Example : Gathering
Config.canceledtext = "Canceled" -- Example : Canceled

-- OBJECT TYPE AND OFFSET
Config.model = "Prop_weed_01" -- Example : Prop_weed_01 http://www.test.raccoon72.ru/?c=ext_veg
Config.offset = vector3(0,0,-1) -- Object position offset

-- ANIMATION TO PLAY
Config.animation = "prop_human_parking_meter" -- Animation played https://wiki.gtanet.work/index.php?title=Animations (example : WORLD_HUMAN_GARDENER_PLANT)

-- RANGE AND AMOUNT TO GIVE
Config.range = 2 -- Range to display the text
Config.numbertogive = 1 -- Number of items to give

-- DELAY
Config.delaymin = 10000 -- Minimum time to gather (delay will be random between delaymin and delaymax)
Config.delaymax = 20000 -- Maximum time to gather (delay will be random between delaymin and delaymax)

-- KEYS
Config.key = 47 -- Key = "G" https://docs.fivem.net/docs/game-references/controls/
Config.keytext = "G" -- Text to display for the key to press

-- GATHER LOCATIONS
Config.locations = {
    ["positions"] = { -- DON'T CHANGE
        [1] = vector3(556.6391, 786.7302, 200.50), -- Position 1
        [2] = vector3(125.1127, -434.440, 41.067), -- Position 2
        [3] = vector3(113.5972, -423.159, 41.060)  -- Position 3
    }
}

Be careful : The objects are spawned the first time a player joins the server, if you restart qb-gathering, it will spawn new objects on top of the old ones !
Preferably try to use the delete laser to remove the old qb-gathering objects if you intend to restart the script.

Hits

qb-gathering's People

Contributors

kurosar avatar

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.