Setup

Installation

Follow the instructions below to run the gusti-boostsprint script on your server

  • Download latest version in github

  • Extract rar file [STANDALONE] Gusti Boostsprint

  • Copy / cut gusti-boostsprint into your server's resources folder

  • Drag and drop the gusti-boostsprint.sql file into your database

  • Open server.cfg

  • Add the gusti-boostsprint script by ensure gusti-boostsprint in server.cfg

  • Restart server

  • Finished

  • Now you can enjoy the features of the gusti-boostsprint script on your server

Configuration

Config = {}

Config.Framework = "ESX" -- ESX/QBCore
Config.UseOxInventory = true -- Set this to true if you are using ox_inventory
Config.DurationBoostSprint = 10000 -- Time how long it takes to increase running speed in seconds

Config.Language = {
    active = "Your power is now full power",
    notactive = "You are exhausted"
}

Ox Inventory

If you set UseOxInventory to true then you have to add a little code inside the ox_inventory script

ox_inventory/data/items.lua
['pill_boost_sprint'] = {
    label = 'Pill Boost Sprint',
    weight = 1,
    stack = true,
    close = true,
},
ox_inventory/modules/items/client.lua
Item('pill_boost_sprint', function(data, slot)
    TriggerEvent("gusti-boostsprint:active")
end)

Framework

If you are using the Esx framework, you will need to add items to the database

gusti-boostsprint/setup/gusti-boostsprint.sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ('pill_boost_sprint', 'Pill Boost Sprint', 1, 0, 1)
;

Custom Notification

You can customize notifications according to your wishes, which can be found on line 45 > 52

gusti-boostsprint/client/main.lua
RegisterNetEvent('gusti-boostsprint:notify')
AddEventHandler('gusti-boostsprint:notify', function(args, _type, time)
    if Config.Framework == "ESX" then
        ESX.ShowNotification(args, _type, time)
    elseif Config.Framework == "QBCore" then
        QBCore.Functions.Notify(args, _type, time)
    end
end)

Last updated