ixHal Scripts
HomeTebexDiscordYouTube
  • 👋Welcome To IxHal Scripts!
  • About us
    • 🚀About me
  • Paid Scripts
    • 👨‍🔧Chop Shop
      • Preview
      • Setup
      • Config
    • 🌡️Meth Manufacturing
      • Preview
      • Setup
      • Config
    • 🚛Garbage Job
      • Preview
      • Setup
      • Config
    • ⛏️Mining Activity
      • Preview
      • Setup
      • Config
    • 💰Drug Sales
      • Preview
      • Setup
      • Config
      • API
  • Free Scripts
    • 🏋️‍♂️Weight System
      • Preview
      • Config
    • 🚗Car Jack
      • Preview
      • Setup
      • Config
Powered by GitBook
On this page
  1. Paid Scripts
  2. Chop Shop

Config

Config = {}
--The current phones are supported:
--[[
    'qb-phone'
    'qs-phone'
    'GKSPhone'
    'RoadPhone'
    'lb-phone'
    'custom'
]]
Config.Framework = 'qbcore'-- [ONLY SUPPORTS 'qbcore' FOR NOW! THIS IS FOR A FUTURE UPDATE!]

--If you wish to add your own head into client_no_encryption.lua or open up a ticket in our discord!
Config.PhoneResource = 'qb-phone'

Config.Police = {
    --The name of the police jobs you use.
    Jobs = {
        'police',
        'sheriff',
        'sasp',
        'lspd',
        --add your own here
    },

    --Change this to the number of police you require to be online before being allowed to deliver a specific vehicle, Leave at 0 if you wish to not require police online.
    --I decided to not have this effect the open world chopshop style due to how annoying it would be for players to go get a car and go to the chopshop only to find out there is no police online.
    Required = 0,

    --This enables a multiplier based on police online that adds more parts to the players overall loot.
    --if 4 officers are online and a player gets 20 rubber, 10 scrap metal etc they would receieve 100% more of each reward, so in total they would get 30 rubber, 15 scrap metal etc.
    PercentageMultipliersEnabled = true,
    PercentageMultipliers = {
        --[number of cops (must be int)] = percentage to add (must be int),
        [2] = 50,--With 2 cops online we will add 50% more materials, (If player received 10 scrap we would add 5 to it, total: 15)
        [4] = 100,--With 4 cops online we will add 100% more materials, (If player received 10 scrap we would add 10 to it, total: 20)
        [8] = 200,--With 8 cops online we will add 200% more materials, (If player received 10 scrap we would add 20 to it, total: 30)
    },

    Options = {
        --Blip settings
        sprite = 380,
        display = 6,
        scale = 0.7,
        short_range = true,
        colour = 1,
        text = 'Vehicle Theft',

        --How long the blip lasts in seconds.
        lasting = 180,

        --Notification
        notif = {
            text = 'Vehicle Stolen Report: Plate %s, Location has been marked on your GPS.',
            type = 'primary'
        }
    }
}

--Enable/Disable strong text in the messages, If you get "<strong>" in your text/email set this to false.
Config.StrongText = false

--Best to leave this false unless told otherwise, Enables commands that should only be used when trying to test things.
Config.Debug = false

--A cooldown in seconds that starts after completing a specific delivery job.
Config.DeliverJobCooldown = 1200 --In seconds

--This is the rewards that the player gets when they complete a vehicle dismantle or when they complete a list.
Config.RewardAmounts = {
    --Rewarded always (Completing specific vehicle)
    ['default'] = {rep = 1},

    --Awarded when completing a list
    --If you don't want money to be rewarded to the player simply just remove it like so:
    --['easy'] = {rep = 2},
    ['easy'] = {rep = 2, money = 1000},
    ['hard'] = {rep = 4, money = 1000},
}

--The amount of time it takes to dismantle a part in seconds.
Config.DefaultDismantleTime = 10

--This enables a menu option where you can chose to spend reputation points to decrease the amount of time it takes to dismantle parts.
Config.EnableChoppingSpeedUpgrades = true
--Below are the levels and reputation points you spend to gain the level.
--[[
    {
        dismantle_time_divider = the number that Config.DefaultDismantleTime gets divided by,
        rep = (the rep it costs to upgrade to this level)
    },
]]
--Make sure to keep them in the order going from top to bottom, First levels at the top and decending into the better levels.
Config.ChoppingSpeedLevels = {
    {dismantle_time_divider = 1, rep = 0},--DON'T TOUCH! Its for the first level and needs to be like this! 
    {dismantle_time_divider = 2, rep = 10},
    {dismantle_time_divider = 3, rep = 15},
    {dismantle_time_divider = 4, rep = 25},
}

--Blips
--Set this to false if you want the chop shop starting locations to be a secret, Makes your players have to hunt down the locations, Some people like it, Some don't.
Config.ShowChopLocations = true
Config.BlipOptions = {
    sprite = 380,
    display = 4,
    scale = 0.7,
    short_range = true,
    colour = 2,
    text = 'Chop Shop'
}

--Changes the colour of the radius blip
Config.RadiusBlipColor = 2

--You can change the names of the NPCs in the client_no_encryption.lua file.
--Make sure everything with a %s still has the correct amount otherwise you will receive errors, or your messages will be missing critical information.
--%s is a variable.
--If you need to change certain variables check the options in client_no_encryption.lua, You can edit all you need but make sure to edit it everywhere else it is referenced.
Lang = {
    ['chop_shop'] = 'Chop Shop',
    ['you_are_busy'] = 'You are busy doing something else.',
    ['error_getting_info'] = 'Error getting reputation, Try again.',
    ['receive_text_msg_soon'] = 'You will recieve a text message with a location soon.',
    ['take_vehicle_to'] = 'Now take the vehicle to any known chop shop location.',
    ['no_list'] = 'You currently dont have a list!',
    ['have_list'] = 'You already have a list, complete that one first.',
    ['speak_with'] = 'Speak with %s',
    ['chop_vehicle_blip'] = 'Chop Shop Vehicle',
    ['vehicle_delivery'] = 'Vehicle delivery',
    ['dismantling'] = 'Dismantling..',
    ['list'] = 'List',
    ['txt_msg_list'] = 'Here is your %s list: %s%s%s%s Good luck!',
    ['txt_msg_spec_veh'] = 'You are looking for a %s%s%s With the numberplate: %s%s%s, A radius location has been marked on your map.',
    ['time_hms'] = '%s hours, %s minutes and %s seconds.',
    ['time_ms'] = '%s minutes and %s seconds.',
    ['time_s'] = '%s seconds.',
    ['not_enough_pd'] = 'There is not enough officers on duty, Minimum officers required is: %s',
    ['no_job'] = 'We have no jobs for you at the moment, Try again in: %s',
    ['all_locations_busy'] = 'All locations are currently busy, Try again soon.',
    ['upgraded_dismantle_speed'] = 'You have upgraded your dismantle speed! This cost you %s rep',
    ['upgrade_dismantle_speed_not_enough'] = "You don't have enough rep to do this! You need %s more rep.",
    ['gained_rep'] = 'You gained %s chopshop rep!',
    ['finished_list_gained_rep'] = 'You finished your list and gained %s extra rep!',
    ['finished_list_gained_money'] = 'You was also rewarded $%s for completing the list.'
}

Menu_Lang = {
    ['deliver_specific_vehicle'] = 'Deliver a specific vehicle',
    ['check_list'] = 'Check Current List',
    ['get_easy_list'] = 'Get a easy list of vehicles',
    ['get_hard_list'] = 'Get a hard list of vehicles',
    ['header'] = 'So you are interested in cars? I may have something for you..',
    ['current_rep'] = 'Current Rep: %s',
    ['dismantle_level'] = 'Dismantle Upgrade Level: %s',
    ['dismantle_faster'] = 'You currently dismantle %sx faster',
    ['upgrade_dismantle'] = 'Upgrade Dismantle Speed For %s rep',
    ['dismantle_upgrade_info'] = 'This upgrade makes you dismantle %sx faster',
    ['stop_talking'] = 'Stop Talking',
}

Draw_Lang = {
    ['chop_vehicle'] = {'Press [E] to Chop Vehicle', 2, 38},--[Message, padindex, control index]
    ['store_part'] = {'Press [E] to Store Part', 2, 38, 'Store Part Here'},--[Message, padindex, control index, Message when too far]
    ['dismantle_part'] = {'Press [E] to Dismantle', 2, 38, 'Dismantle %s'},--[Message, padindex, control index, Message when too far], You can change %s here to "Part" if you don't want the bone name to be displayed.
}
function RemoveTargetEntity(entity, name)
    exports['qb-target']:RemoveTargetEntity(entity, (Lang['speak_with']):format(name))
end

function AddTargetEntity(entity, name)
    exports['qb-target']:AddTargetEntity(entity, {
        options = {
            {
                event = "chopshop:OpenChopMenu",
                icon = "fas fa-box-circle-check",
                label = (Lang['speak_with']):format(name),
            },
        },
        distance = 2
    })
end

--Fuinction for drawing text to world position
function DrawText3Ds(x,y,z, text)
    SetTextScale(0.35, 0.35)
    SetTextFont(4)
    SetTextProportional(1)
    SetTextColour(255, 255, 255, 215)
    SetTextEntry('STRING')
    SetTextCentre(true)
    AddTextComponentString(text)
    SetDrawOrigin(x, y, z, 0)
    DrawText(0.0, 0.0)
    local factor = (string.len(text)) / 370
    DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
    ClearDrawOrigin()
end

--Setup this function your self or leave if empty if you dont wish to alert the police.
--If you need help setting this up join our discord, You can find a link in the readme file.
function CallThePolice(vehicle, location)
    --Setup your own police alert here if you wish.
    TriggerServerEvent('chopshop:CallPolice', location, GetVehicleNumberPlateLang(vehicle))
    --If you are using ps-dispatch, delete the line above and uncomment out the expiort below.
    --exports['ps-dispatch']:VehicleTheft(vehicle)
end

--The function that is called to check if we should call the police.
--Between 9:00PM and 7:59AM there is a 25% chance the police get called.
--The rest of the time there is a 50% chance the police get called.
function CheckToCallPolice(veh, info)
    local clockHours = GetClockHours()

    if (clockHours >= 20 and clockHours < 8 ) then
        if math.random() <= 0.25 then
            CallThePolice(veh, vector3(info.carlocation.blip.location.x, info.carlocation.blip.location.y, info.carlocation.blip.location.z))
        end
    else
        if math.random() <= 0.5 then
            CallThePolice(veh, vector3(info.carlocation.blip.location.x, info.carlocation.blip.location.y, info.carlocation.blip.location.z))
        end
    end
end

--Here you can manage the PD notifcation and blip if you want to do anything special, You can edit the basics in the config.lua file.
local blips = {}

local function deepcopy(orig)
    local orig_type = type(orig)
    local copy
    if orig_type == 'table' then
        copy = {}
        for orig_key, orig_value in next, orig, nil do
            copy[deepcopy(orig_key)] = deepcopy(orig_value)
        end
        setmetatable(copy, deepcopy(getmetatable(orig)))
    else -- number, string, boolean, etc
        copy = orig
    end
    return copy
end

--The net event that is called for each officer on duty.
RegisterNetEvent('chopshop:AlertPD', function(location, plate)
    local self = {
        time = deepcopy(Config.Police.Options.lasting),
        location = location,
        id = #blips +1
    }

    self.blip = AddBlipForCoord(location.x, location.y, location.z)
    SetBlipSprite(self.blip, Config.Police.Options.sprite)
    SetBlipDisplay(self.blip, Config.Police.Options.display)
    SetBlipScale(self.blip, Config.Police.Options.scale)
    SetBlipAsShortRange(self.blip, Config.Police.Options.short_range)
    SetBlipColour(self.blip, Config.Police.Options.colour)
    BeginLangCommandSetBlipName("STRING")
	AddLangComponentString(Config.Police.Options.text)
	EndLangCommandSetBlipName(self.blip)

    self.blip2 = AddBlipForCoord(location.x, location.y, location.z)
    SetBlipSprite(self.blip2, 161)
    SetBlipColour(self.blip2, 1)
    SetBlipAsShortRange(self.blip2, true)

    self.timer = function()
        Citizen.CreateThread(function()
            while self.time > 0 do
                Citizen.Wait(1000)
                self.time -= 1
            end
            RemoveBlip(self.blip)
            RemoveBlip(self.blip2)
            blips[self.id] = nil
        end)
    end

    self.timer()
    blips[self.id] = self
    Notify((Config.Police.Options.notif.text):format(plate), 'primary')
end)

--Here you can edit the following to your phones needs!
--If you need help ask in discord!
function SendPlayerEmail(Sender, Subject, Message, Buttons)
    if Config.PhoneResource == 'qb-phone' then
        TriggerServerEvent('qb-phone:server:sendNewMail', {
            sender = Sender,
            subject = Subject,
            message = Message,
            button = Buttons
        })
    elseif Config.PhoneResource == 'qs-phone' then
        TriggerServerEvent('qs-smartphone:server:sendNewMail', {
            sender = Sender,
            subject = Subject,
            message = Message,
            button = Buttons
        })
    elseif Config.PhoneResource == 'GKSPhone' then
        exports["gksphone"]:SendNewMail({sender = Sender,image = '/html/static/img/icons/mail.png',subject = Subject,message = Message})
    elseif Config.PhoneResource == 'RoadPhone' then
        TriggerServerEvent('roadphone:receiveMail', {
            sender = Sender,
            subject = Subject,
            message = Message,
            image = '/public/html/static/img/icons/app/mail.png',
            button = {}
        })
    elseif Config.PhoneResource == 'lb-phone' then
        TriggerServerEvent('chopshop:HandleMessage', Sender, Subject, Message)
    elseif Config.PhoneResource == 'custom' then
        --Do your own magic here
    end
end

-- These are all the chopshop locations.
--You can easily add another location by following the example below.
--[[
    {
        {
            --The PolyZone vector2 coords, Put them here. If you want to create a new polyzone and don't know how check out the PolyZone wiki here: https://github.com/mkafrin/PolyZone/wiki
            vector2(x,y), 
            vector2(x,y), 
        },
        {
            name="chop_docks",--The name of the zone, This needs to be a unique name for PolyZone, I would recommend something like `chop_yournamehere`.
            minZ=2.0,--Minimum Z height of the zone
            maxZ=12.0,--Maximum Z height of the zone
            data = {
                deliveryzone = vector3(1198.98, -3117.34, 5.54),--a vector3 locations where people deposit the parts when they take them off a vehicle.
            },
        },
        {
            name = 'Steven',--The name of the NPC you interact with at the location.
            model = 'mp_m_waremech_01',--The NPC model.
            location = vector4(1209.82, -3117.6, 5.34, 93.85),--The location of the ped. vector4(x, y, z, heading)
            scenario = "WORLD_HUMAN_CLIPBOARD",--Would recommend keeping this as it is, But you can use another scenario here if you wish, Check here for more scenarios: https://github.com/DioneB/gtav-scenarios
        }
    },
]]
zones = {
    {--Docks
        {
            vector2(1197.3227539062, -3110.8374023438), 
            vector2(1197.2797851562, -3123.0354003906), 
            vector2(1211.7237548828, -3122.9050292969), 
            vector2(1210.4064941406, -3110.8359375)
        },
        {
            name="chop_docks",
            minZ=2.0,
            maxZ=12.0,
            data = {
                deliveryzone = vector3(1198.98, -3117.34, 5.54)
            },
        },
        {
            name = 'Steven',
            model = 'mp_m_waremech_01',
            location = vector4(1209.82, -3117.6, 5.34, 93.85),
            scenario = "WORLD_HUMAN_CLIPBOARD",
        }
    },
    {--Grapeseed
        {
            vector2(1975.625, 5163.6572265625),
            vector2(1987.7620849609, 5173.734375),
            vector2(1982.36328125, 5180.0419921875),
            vector2(1970.3227539062, 5169.91796875)
        },
        {
            name="chop_grapeseed",
            minZ=43.0,
            maxZ=52.0,
            data = {
                deliveryzone = vector3(1982.05, 5178.04, 47.64)
            },
        },
        {
            name = 'Earl',
            model = 'a_m_m_hillbilly_01',
            location = vector4(1980.47, 5177.95, 47.54, 192.41),
            scenario = "WORLD_HUMAN_CLIPBOARD",
        }
    },
    {--Sandy
        {
            vector2(2343.6965332031, 3059.0529785156),
            vector2(2329.0854492188, 3058.9951171875),
            vector2(2329.162109375, 3041.9250488281),
            vector2(2343.7253417969, 3042.1452636719)
        },
        {
            name="chop_sandy",
            minZ=44.0,
            maxZ=52.0,
            data = {
                deliveryzone = vector3(2342.63, 3046.23, 48.15)
            },
        },
        {
            name = 'Dusty',
            model = 's_m_y_xmech_02',
            location = vector4(2340.01, 3057.7, 48.05, 176.85),
            scenario = "WORLD_HUMAN_CLIPBOARD",
        }
    },
    {--Mission row
        {
            vector2(479.36813354492, -1328.7658691406),
            vector2(488.57229614258, -1324.0258789062),
            vector2(478.85641479492, -1304.8531494141),
            vector2(469.60586547852, -1309.576171875)
        },
        {
            name="chop_mr",
            minZ = 26.206434249878,
            maxZ = 36.311862945557,
            data = {
                deliveryzone = vector3(473.82, -1313.81, 29.21)
            },
        },
        {
            name = 'Frank',
            model = 'mp_m_waremech_01',
            location = vector4(474.82, -1308.63, 29.21, 165.0),
            scenario = "WORLD_HUMAN_CLIPBOARD",
        }
    },
}

--These are the available menu options when speaking with the NPC found at the chop locations.
--Each specific vehicle delivered will give +1 rep.
--You can add more list options but they will only work like the easy and hard list.
--Here is a example of a medium list
--Remember to add a ['medium'] category to server_no_encryption.lua in the listvehicles table and populate it with the vehicles you want people to get.
--[[
    {
        rep = 10,--Reputation needed to be able to see and select this option.
        menu = {
            header = 'Get a medium list of vehicles',--Name of the option. This will give the player a medium list of vehicles to complete.
            params = {
                isServer = false,--Don't touch this.
                event = 'chopshop:TakeAList',--Don't touch this.
                args = 'medium'--Don't touch this.
            }
        }
    },
]]
AvailableChopOptions = {
    {
        rep = 0,--LEAVE THIS AT 0 otherwise new players wont have anything to do!
        menu = {
            header = Menu_Lang['deliver_specific_vehicle'],--Name of the option. This is a task to get a vehicle marked on your map.
            params = {
                isServer = false,--Don't touch this.
                event = 'chopshop:TakeVehicleDelivery'--Don't touch this.
            }
        }
    },
    {
        rep = 5,--Reputation needed to be able to see and select this option.
        menu = {
            header = Menu_Lang['check_list'],--Name of the option. This will show you your current chopshop list.
            params = {
                isServer = false,--Don't touch this.
                event = 'chopshop:CheckList',--Don't touch this.
            }
        }
    },
    {
        rep = 5,--Reputation needed to be able to see and select this option.
        menu = {
            header = Menu_Lang['get_easy_list'],--Name of the option. This will give the player a easy list of vehicles to complete.
            params = {
                isServer = false,--Don't touch this.
                event = 'chopshop:TakeAList',--Don't touch this.
                args = 'easy'--Don't touch this.
            }
        }
    },
    {
        rep = 30,--Reputation needed to be able to see and select this option.
        menu = {
            header = Menu_Lang['get_hard_list'],--Name of the option. This will give the player a hard list of vehicles to complete.
            params = {
                isServer = false,--Don't touch this.
                event = 'chopshop:TakeAList',--Don't touch this.
                args = 'hard'--Don't touch this.
            }
        }
    },
}
--The function for deleting vehicles after the player has chopped them.
function DeleteChopShopVehicle(vehicle_net, vehicle_entity)
    --Do your own magic here.
    DeleteEntity(vehicle_entity)
end

function ServerHandleMail(src, Sender, Subject, Message)
    if Config.PhoneResource == 'lb-phone' then
        exports["lb-phone"]:SendMessage(Sender, exports["lb-phone"]:GetEquippedPhoneNumber(src), Message, nil, nil, nil)
    elseif Config.PhoneResource == 'custom' then

    end
end

RegisterNetEvent('chopshop:CallPolice', function(location, plate)
    local police = GetPoliceOnduty()
    for i = 1, #police, 1 do TriggerClientEvent('chopshop:AlertPD', police[i], location, plate) end
end)

RegisterNetEvent('chopshop:HandleMessage', function(Sender, Subject, Message)
    local src = source
    ServerHandleMail(src, Sender, Subject, Message)
end)

--This is a list of locations to chose from when a player starts a specific vehicle mision.
deliverylocations = {
    --[[
        {
            blip = {
                location = vector3(x, y, z),--Location of the center blip.
                radius = 90.0,--Radius of the blip.
            },
            locations = {
                vector4(x, y, z, heading),--Possible spawn location for the vehicle.
                vector4(x, y, z, heading),--Possible spawn location for the vehicle.
            },
        },
    ]]

    {--Red garage in the city
        blip = {
            location = vector3(-321.59, -761.44, 38.78),--Location of the center blip.
            radius = 90.0,--Radius of the blip.
        },
        locations = {
            vector4(-316.42, -755.03, 52.64, 159.58),--Possible spawn location for the vehicle.
            vector4(-295.02, -762.7, 52.64, 158.92),--Possible spawn location for the vehicle.
            vector4(-307.38, -773.41, 52.64, 161.21),--Possible spawn location for the vehicle.
            vector4(-341.34, -754.85, 52.64, 86.67),--Possible spawn location for the vehicle.
            vector4(-356.86, -754.4, 52.64, 91.75),--Possible spawn location for the vehicle.
            vector4(-310.82, -756.53, 47.82, 160.61),--Possible spawn location for the vehicle.
            vector4(-298.33, -760.9, 47.82, 339.85),--Possible spawn location for the vehicle.
            vector4(-303.27, -774.72, 47.82, 340.91),--Possible spawn location for the vehicle.
            vector4(-276.06, -771.64, 47.82, 251.24),--Possible spawn location for the vehicle.
            vector4(-273.2, -761.31, 47.82, 71.59),--Possible spawn location for the vehicle.
            vector4(-341.36, -756.79, 38.17, 269.62),--Possible spawn location for the vehicle.
            vector4(-328.75, -751.76, 38.17, 180.92),--Possible spawn location for the vehicle.
            vector4(-305.13, -758.0, 38.17, 342.33),--Possible spawn location for the vehicle.
            vector4(-290.2, -747.21, 38.17, 337.41),--Possible spawn location for the vehicle.
        },
    },
    {--Ron oil parking lot
        blip = {
            location = vector3(2721.41, 1363.79, 23.95),
            radius = 90.0,
        },
        locations = {
            vector4(2728.73, 1369.76, 23.95, 180.3),
            vector4(2710.64, 1356.06, 23.95, 1.31),
            vector4(2739.69, 1355.94, 23.95, 1.25),
            vector4(2739.88, 1347.04, 23.95, 1.25),
            vector4(2692.24, 1330.73, 23.94, 0.54),
            vector4(2743.38, 1391.69, 23.94, 180.4),
        },
    },
    {--Paleto parking lot
        blip = {
            location = vector3(77.56, 6382.23, 31.24),
            radius = 130.0,
        },
        locations = {
            vector4(63.11, 6377.45, 30.63, 35.55),
            vector4(73.68, 6362.75, 30.62, 13.5),
            vector4(80.76, 6366.44, 30.62, 12.4),
            vector4(94.83, 6372.91, 30.62, 191.79),
            vector4(48.36, 6363.07, 30.63, 37.47),
            vector4(37.45, 6379.16, 30.62, 209.54),
            vector4(19.07, 6361.95, 30.62, 214.42),
            vector4(130.42, 6423.78, 30.74, 29.21)
        },
    },
    {--LSIA car parking lot
        blip = {
            location = vector3(-738.83, -2025.54, 9.02),
            radius = 130.0,
        },
        locations = {
            vector4(-716.43, -2025.57, 8.28, 281.13),
            vector4(-712.42, -2039.5, 8.28, 112.99),
            vector4(-723.12, -2048.4, 8.3, 132.98),
            vector4(-742.04, -2064.68, 8.31, 158.5),
            vector4(-759.74, -2059.14, 8.3, 316.42),
            vector4(-779.21, -2040.24, 8.28, 133.15),
            vector4(-729.56, -1968.85, 8.26, 101.53),
            vector4(-735.18, -2033.33, 8.3, 90.48)
        },
    },
    {--Pier parking lot
        blip = {
            location = vector3(-1558.39, -1004.04, 12.41),
            radius = 90.0,
        },
        locations = {
            vector4(-1561.6, -1002.85, 12.41, 24.26),
            vector4(-1561.09, -983.21, 12.41, 252.86),
            vector4(-1546.88, -993.94, 12.41, 205.76),
            vector4(-1537.64, -1001.07, 12.41, 252.19),
            vector4(-1534.81, -980.91, 12.41, 136.33),
            vector4(-1566.88, -1035.71, 12.41, 253.37)
        },
    },
    {--Parking lot near the beach houses
        blip = {
            location = vector3(-1729.56, -723.56, 9.68),
            radius = 50.0,
        },
        locations = {
            vector4(-1734.99, -714.76, 9.54, 48.83),
            vector4(-1737.27, -732.49, 9.81, 317.24),
            vector4(-1739.39, -730.39, 9.81, 320.94),
            vector4(-1742.62, -724.19, 9.84, 228.42)
        },
    },
    {--Parking lot near the beach houses
        blip = {
            location = vector3(-1997.17, -319.22, 47.5),
            radius = 60.0,
        },
        locations = {
            vector4(-1984.97, -289.4, 47.5, 52.14),
            vector4(-1993.45, -303.19, 47.5, 235.61),
            vector4(-1981.51, -308.46, 47.5, 237.54),
            vector4(-1973.98, -297.74, 47.5, 55.92),
            vector4(-1995.32, -327.5, 43.5, 56.24),
            vector4(-2000.88, -336.37, 43.5, 233.0),
            vector4(-2007.46, -345.32, 43.5, 56.78),
            vector4(-2020.68, -362.52, 43.5, 203.63)
        },
    },
    {--paleto hardware parking lot
        blip = {
            location = vector3(-55.65, 6539.41, 30.94),
            radius = 90.0,
        },
        locations = {
            vector4(-86.52, 6544.56, 30.88, 134.19),
            vector4(-81.21, 6539.19, 30.88, 134.82),
            vector4(-79.95, 6563.13, 30.88, 43.34),
            vector4(-85.28, 6558.35, 30.88, 43.59),
            vector4(-63.76, 6563.69, 30.88, 136.9),
            vector4(-54.42, 6554.33, 30.88, 312.15),
            vector4(-44.59, 6544.17, 30.88, 135.45),
            vector4(-34.41, 6534.4, 30.88, 314.63)
        },
    },
    {--Sandy hotel
        blip = {
            location = vector3(1121.26, 2661.23, 37.39),
            radius = 70.0,
        },
        locations = {
            vector4(1116.76, 2647.53, 37.39, 178.15),
            vector4(1127.61, 2648.35, 37.39, 359.6),
            vector4(1111.4, 2657.99, 37.39, 89.05),
            vector4(1105.36, 2663.48, 37.37, 0.7)
        },
    },
}

--A list of vehicles to randomly select from based on the players chopshop rep.
--Make sure to keep them in the order where the rep number is in the correct place like:
--[[
    {
        rep = 0,
        cars = {
            `car`,
        },
    },
    {
        rep = 2,
        cars = {
            `car`,
        },
    },
    {
        rep = 3,
        cars = {
            `car`,
        },
    },
    {
        rep = 9,
        cars = {
            `car`,
        },
    },
]]
--If the person has 6 rep it will no longer pick from the list below so in this case it would chose from this list.
--[[
    {
        rep = 5,--Rep needed for these vehicles to be chosen
        cars = {
            `jackal`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `issi3`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `prairie`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `brioso2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `oracle`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
]]
deliveryvehicles = {
    {
        rep = 0,--Rep needed for these vehicles to be chosen
        cars = {
            `asbo`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `blista`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `brioso`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `panto`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `rhapsody`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `vamos`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `sultan`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
    {
        rep = 5,--Rep needed for these vehicles to be chosen
        cars = {
            `jackal`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `issi3`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `prairie`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `brioso2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `oracle`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
    {
        rep = 10,--Rep needed for these vehicles to be chosen
        cars = {
            `exemplar`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `f620`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `felon2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `clique`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `vigero`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
    {
        rep = 15,--Rep needed for these vehicles to be chosen
        cars = {
            `sultanrs`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `cinquemila`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `novak`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `vagrant`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `yosemite3`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
    {
        rep = 20,--Rep needed for these vehicles to be chosen
        cars = {
            `gauntlet4`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `toros`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `comet7`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `locust`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
            `mamba`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        },
    },
}

--The vehicles that will be randomly selected when getting a easy or hard list.
--Remember to add a new category here if you add anything to the client_no_encryption AvailableChopOptions table.
listvehicles = {
    ['easy'] = {
        `blista`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `dilettante`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `issi2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `panto`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `prairie`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `buccaneer`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `dominator`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `granger`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `habanero`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `mesa`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `radi`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `serrano`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `asea`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `asterope`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `glendale`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `intruder`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `premier`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `washington`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `blista2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `buffalo`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `regina`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
    },

    ['hard'] = {
        `exemplar`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `baller`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `f620`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `felon2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `jackal`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `dubsta`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `huntley`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `patriot`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `rocoto`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `banshee`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `comet2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `coquette`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `feltzer2`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `jester`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `massacro`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `schwarzer`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `rapidgt`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `surano`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `bullet`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
        `infernus`,--Vehicle name to hash key, use `ModelNameHere` or GetHashKey('ModelNameHere')
    }
}

--Each individual part on the vehicle will give these types of rewards.
--You can't add more parts as this uses the vehicle native from fivem to see what parts each vehicle has.
--You can change the rewards to what ever you would like though, Just follow the example below.
--[[
    ['boot'] =          {
        {item = 'metalscrap', amount = 2, chance = 100},--This means that there will always be 2 metalscrap from the boot every 100% of the time.
        {item = 'rubber', amount = 2, chance = 75}--This means that there will be 2 rubber from the boot every 75% of the time.
        {item = 'metalscrap', amount = {2,4}, chance = 100}--You can use amount = {min,max} to chose a random amount of parts this means it will add between 2 to 4 more metal scrap to the loot 100% of the time.
    },
]]

partRewards = {
    ['boot'] =          {{item = 'metalscrap', amount = 2, chance = 100}, {item = 'rubber', amount = 2, chance = 75}},
    ['bonnet'] =        {{item = 'metalscrap', amount = 2, chance = 100}, {item = 'rubber', amount = 2, chance = 75}},
    
    ['engine'] =        {{item = 'metalscrap', amount = {2,4}, chance = 100}, {item = 'rubber', amount = 2, chance = 75}, {item = 'copper', amount = {3,6}, chance = 75}},
    
    ['wheel_lf'] =      {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_rf'] =      {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_lm1'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_rm1'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_lm2'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_rm2'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_lm3'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_rm3'] =     {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_lr'] =      {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},
    ['wheel_rr'] =      {{item = 'rubber', amount = {2,6}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 75}},

    ['exhaust'] =       {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_2'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_3'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_4'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_5'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_6'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_7'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_8'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_9'] =     {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_10'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_11'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_12'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_13'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_14'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_15'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},
    ['exhaust_16'] =    {{item = 'metalscrap', amount = 1, chance = 100}, {item = 'steel', amount = 1, chance = 25}},

    ['door_dside_f'] =  {{item = 'glass', amount = {2,4}, chance = 100}, {item = 'plastic', amount = {1,2}, chance = 50}},
    ['door_dside_r'] =  {{item = 'glass', amount = {2,4}, chance = 100}, {item = 'plastic', amount = {1,2}, chance = 50}},
    ['door_pside_f'] =  {{item = 'glass', amount = {2,4}, chance = 100}, {item = 'plastic', amount = {1,2}, chance = 50}},
    ['door_pside_r'] =  {{item = 'glass', amount = {2,4}, chance = 100}, {item = 'plastic', amount = {1,2}, chance = 50}},

    ['bumper_f'] =      {{item = 'plastic', amount = {2,4}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 50}},
    ['bumper_r'] =      {{item = 'plastic', amount = {2,4}, chance = 100}, {item = 'metalscrap', amount = 1, chance = 50}},
}
local server = IsDuplicityVersion()

if server then-- Server Only Functions

    --Currently unused, Inteded for a future feature.
    --function IsVehicleOwned(plate)
    --    local result = false
    --    if Config.Framework == 'qbcore' then
    --        result = MySQL.scalar.await('SELECT 1 from player_vehicles WHERE plate = ?', {plate})
    --    elseif Config.Framework == 'esxlegacy' then
    --        result = MySQL.scalar.await('SELECT 1 from owned_vehicles WHERE plate = ?', {plate})
    --    end
    --    return result ~= nil and result ~= false and true or false
    --end

else--Client only functions

end

if Config.Framework == 'qbcore' then
    Framework = exports['qb-core']:GetCoreObject()

    if not server then--Client only functions
        PlayerData = Framework.Functions.GetPlayerData()

        TriggerCallback = function(cb_name, f, ...)
            Framework.Functions.TriggerCallback(cb_name, f,...)
        end
        Notify = function(txt, notif_type, time)
            Framework.Functions.Notify(txt, notif_type, time)
        end

        RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
            PlayerData = Framework.Functions.GetPlayerData()
            Framework.PlayerLoaded = true

            TriggerCallback('chopshop:GetPlayerChopInfo', function(list, deli, choppinglvl)
                choplist = list
                delivery = deli
                choppingLevel = choppinglvl
            end)
        end)
        RegisterNetEvent('QBCore:Player:SetPlayerData', function(val)
            PlayerData = val
        end)
        RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
            PlayerData = {}
            choplist = nil
            delivery = nil
        end)

        --Getters
        GetJobName = function()
            return PlayerData.job.name
        end
        GetVehicleProperties = function(vehicle)
            return Framework.Functions.GetVehicleProperties(vehicle)
        end
        GetItemInfoByName = function(item_name)
            return Framework.Shared.Items[item_name]
        end

        DoProgressBar = function(name, label, time, movement)
            local inProg, progCancelled = true, false

            Framework.Functions.Progressbar(name, label, time, false, true, movement, {}, {}, {}, function() -- Done
                inProg = false
            end, function() -- Cancel
                progCancelled = true
                inProg = false
            end)

            while inProg == true do Wait(10) end

            return inProg, progCancelled
        end

        ShowHelpNotif = function(txt, pos)
            exports['qb-core']:DrawText(txt, pos)
        end
        StopShowHelpNotif = function()
            exports['qb-core']:HideText()
        end
    else-- Server only functions
        --Callback function
        RegisterCallback = function(cb_name, f)
            Framework.Functions.CreateCallback(cb_name, f)
        end

        Notify = function(src, txt, notif_type, time)
            TriggerClientEvent('QBCore:Notify', src, txt, notif_type, time)
        end
        --Getters
        GetPlayer = function(id)
            if type(id) == 'number' then
                return Framework.Functions.GetPlayer(id)
            else
                return Framework.Functions.GetPlayerByCitizenId(id)
            end
        end
        GetUniquePlayerId = function(player)
            return player.PlayerData.citizenid
        end
        GetPlayerMetadata = function(player, index)
            return player.Functions.GetMetaData(index)
        end
        GetPlayerJobName = function(player)
            return player.PlayerData.job.name
        end
        GetPlayerSource = function(player)
            return player.PlayerData.source
        end
        GetPlayerFirstName = function(player)
            return player.PlayerData.charinfo.firstname
        end
        GetPoliceOnduty = function()
            local players = {}
            for i = 1, #Config.Police.Jobs, 1 do
                local police = Framework.Functions.GetPlayersOnDuty(Config.Police.Jobs[i])
                for i2 = 1, #police, 1 do
                    players[#players +1] = police[i2]
                end
            end

            return players
        end
        GetPlayerAccountBalance = function(player, account)
            return player.Functions.GetMoney(account)
        end

        --Setters
        SetPlayerMetadata = function(player, index, value)
            player.Functions.SetMetaData(index, value)
        end
        AddPlayerMoney = function(player, account, amount, reason)
            return player.Functions.AddMoney(account, amount, reason)
        end
        AddPlayerItem = function(player, item_name, amount, item_metadata)
            if player.Functions.AddItem(item_name, amount, nil, item_metadata) then
                TriggerClientEvent('inventory:client:ItemBox', player.PlayerData.source, Framework.Shared.Items[item_name], "add")
                return true
            else
                return false
            end
        end
        RemovePlayerItem = function(player, item_name, amount, slot)
            if player.Functions.RemoveItem(item_name, amount, slot) then
                TriggerClientEvent("inventory:client:ItemBox", player.PlayerData.source, Framework.Shared.Items[item_name], "remove")
                return true
            else
                return false
            end
        end
        RemovePlayerMoney = function(player, account, amount)
            return player.Functions.RemoveMoney(account, amount, 'Bought item from ixhal-meth-manufacturing ')
        end
        SetPlayerJob = function(player, job, grade)
            player.Functions.SetJob(job, grade)
        end
        CreateUseableItem = function(item_name, f)
            Framework.Functions.CreateUseableItem(item_name, f)
        end
    end
end
PreviousSetupNextMeth Manufacturing

Last updated 1 year ago

👨‍🔧