Installation
Last updated
Last updated
QBCore Framework qb-input qb-menu ps-dispatch - ()
ESX Framework qb-input - (Included in the pack) qb-menu - (Included in the pack) ps-dispatch (ESX) - ()
Drag the script in your folder
Add the following item to yourinventory/data/items.lua
QBCore users to qbcore/shared/items.lua
Add the item image to your inventory/images
If you are using a different inventory then literally create the same items for your custom inventory.
-- Chop Shop
['splaka'] = {['name'] = 'splaka', ['label'] = 'Fake Plate', ['weight'] = 150, ['type'] = 'item', ['image'] = 'plaka.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['airbag'] = {['name'] = 'airbag', ['label'] = 'AirBag', ['weight'] = 250, ['type'] = 'item', ['image'] = 'airbag.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['lowradio'] = {['name'] = 'lowradio', ['label'] = 'Low Quality Radio', ['weight'] = 350, ['type'] = 'item', ['image'] = 'lowradio.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['stockrim'] = {['name'] = 'stockrim', ['label'] = 'Low Quality Wheel', ['weight'] = 150, ['type'] = 'item', ['image'] = 'stockrim.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['highradio'] = {['name'] = 'highradio', ['label'] = 'High Quality Radio', ['weight'] = 250, ['type'] = 'item', ['image'] = 'highradio.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['highrim'] = {['name'] = 'highrim', ['label'] = 'High Quality Wheel', ['weight'] = 350, ['type'] = 'item', ['image'] = 'highrim.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['doors'] = {['name'] = 'doors', ['label'] = 'Doors', ['weight'] = 150, ['type'] = 'item', ['image'] = 'doors.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Kapılar'},
['speaker'] = {['name'] = 'speaker', ['label'] = 'Speaker', ['weight'] = 250, ['type'] = 'item', ['image'] = 'speaker.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['screwdriver'] = {['name'] = 'screwdriver', ['label'] = 'Screwdriver', ['weight'] = 250, ['type'] = 'item', ['image'] = 'screwdriver.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['battery'] = {['name'] = 'battery', ['label'] = 'Battery', ['weight'] = 250, ['type'] = 'item', ['image'] = 'battery.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['belt'] = {['name'] = 'screwdriver', ['label'] = 'Belt', ['weight'] = 250, ['type'] = 'item', ['image'] = 'belt.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
['lockpick'] = {['name'] = 'lockpick', ['label'] = 'Lockpick', ['weight'] = 250, ['type'] = 'item', ['image'] = 'lockpick.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = ''},
-- Chop Shop (ESX)
['splaka'] = {
label = 'Fake Plate',
weight = 200,
client = {
image = 'fake_plate.png',
},
},
['airbag'] = {
label = 'Air Bag',
weight = 10,
client = {
image = 'airbag.png',
},
},
['lowradio'] = {
label = 'Low Radio',
weight = 30,
client = {
image = 'lowradio.png',
},
},
['stockrim'] = {
label = 'Stock Rim',
weight = 10,
client = {
image = 'stockrim.png',
},
},
['highradio'] = {
label = 'High Quality Radio',
weight = 20,
client = {
image = 'highradio.png',
},
},
['highrim'] = {
label = 'High Rim',
weight = 100,
client = {
image = 'highrim.png',
},
},
['doors'] = {
label = 'Vehicle Door',
weight = 200,
client = {
image = 'doors.png',
},
},
['speaker'] = {
label = 'Speaker',
weight = 10,
client = {
image = 'speaker.png',
},
},
['screwdriver'] = {
label = 'Screw Driver',
weight = 30,
client = {
image = 'screwdriver.png',
},
},
['battery'] = {
label = 'Battery',
weight = 10,
client = {
image = 'battery.png',
},
},
['belt'] = {
label = 'Belt',
weight = 20,
client = {
image = 'belt.png',
},
},
['lockpick'] = {
label = 'Lockpick',
weight = 100,
client = {
image = 'lockpick.png',
},
},
First of all install ps-dispatch depending on your framework. You can find the links at the top.
ps-dispatch/client/alerts
local function chopcar()
local coords = GetEntityCoords(cache.ped)
local vehicle = GetVehicleData(cache.vehicle)
local dispatchData = {
message = "Car smashing attempt",
codeName = 'Car chopping',
code = '10-13',
icon = 'fas fa-gun',
priority = 2,
vehicle = vehicle.name,
plate = vehicle.plate,
color = vehicle.color,
coords = coords,
gender = GetPlayerGender(),
street = GetStreetAndZone(coords),
jobs = { 'leo' }
}
TriggerServerEvent('ps-dispatch:server:notify', dispatchData)
end exports('chopcar', chopcar)
ps-dispatch/shared/config.lua
['chopcar'] = {
radius = 0,
sprite = 110,
color = 1,
scale = 1.5,
length = 2,
sound = 'Lose_1st',
sound2 = 'GTAO_FM_Events_Soundset',
offset = false,
flash = false
},
ps-dispatch/client/cl_extraalerts
local function chopcar(vehicle)
local vehdata = vehicleData(vehicle)
local currentPos = GetEntityCoords(PlayerPedId())
local locationInfo = getStreetandZone(currentPos)
local gender = GetPedGender()
TriggerServerEvent("dispatch:server:notify",{
dispatchcodename = "carchop", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
dispatchCode = "10-13",
firstStreet = locationInfo,
gender = gender,
model = vehdata.name,
plate = vehdata.plate,
priority = 2,
firstColor = vehdata.colour,
automaticGunfire = false,
origin = {
x = currentPos.x,
y = currentPos.y,
z = currentPos.z
},
dispatchMessage = "Car smashing attempt", -- message
job = {"police"} -- jobs that will get the alerts
})
end exports('chopcar', chopcar)
ps-dispatch/server/sv_dispatchcodes
["carchop"] = {displayCode = '10-13', description = "Suspicious Activity", radius = 0, recipientList = {'police'}, blipSprite = 66, blipColour = 37, blipScale = 0.5, blipLength = 2, sound = "Lose_1st", sound2 = "GTAO_FM_Events_Soundset", offset = "false", blipflash = "false"},