📚qb-smallresources
Resource for handling **alot** of misc stuff.
Introduction
This resource handles many small tasks for the framework
Discord Logs
Timed Jobs
Consumable foods/beverages/drinks/drugs (sandwich, water_bottle, tosti, beer, vodka etc.)
Removal of GTA's default weapons drops
Drug effects
Removal of GTA's default vehicle spawns (planes, helicopters, emergency vehicles etc.)
Removal of GTA's default emergency service npc's
Removal of GTA's default wanted system
Useable binoculars
Weapon draw animations (normal/holster)
Ability to add teleport markers (from a place to another place)
Taking hostage
Pointing animation with finger (by pressing "B")
Seatbelt and cruise control
Useable parachute
Useable armor
Weapon recoil (specific to each weapon)
Tackle
Calm AI (adjusting npc aggressiveness)
Race Harness
Adjusting npc/vehicle/parked vehicle spawn rates
Infinite ammo for fire extinguisher and petrol can
Removal of GTA's default huds (weapon wheel, cash etc.)
Fireworks
Automatically engine on after entering vehicle
Discord rich presence
Crouch and prone
AFK dection
Configuration
General
If you wish to have default hud components like the crosshair you can find them labeled in client/hudcomponents.lua
Blacklist ped and vehicle models
Consumables
When adding new consumables you need to go into the server/consumables.lua and make that item useable with the QBCore.Functions.CreateUseableItem function more info on how to do that in Server Function Reference
You can also increase the thirst or hunger with ["itemname"] = math.random(-20, -10) or a single number, the only important thing is that the lower number is first
Timed Jobs / Cron
Timed jobs are used to execute code at a certain time every day. For example executing function x every monday when the clock is 08:20 AM etc.
Usage (Server Exports):
CreateTimedJob(hour: number, min: number, callback: function)
Used for registering the actual timed job. Returns the index of the timed job which can be used to force run or stop the timed job. Example:
ForceRunTimedJob(idx: number)
Used to force run a timed job, even if the time isnt correct. Does not bypass local checks in the actual callback though. Example:
StopTimedJob(idx: number)
Stops the timed job forever (unless registered again). Example:
Logs
Logs are located on the server side to hide your webhooks form clients you can find them in the server/logs.lua if you don't know how to make discord webhooks click here
Example
Client
Server
Discord rich presence
More documentation for this can be found here. The configuration for this can be found in the client/discord.lua
Rockstar editor
Commands
/editor - Activates rockstar editor
/record - Starts a recording
/clip- Strarts to record a clip
/saveclip - Saves the clip
/delclip - Deletes clip
Items
vodka - Consumable
beer - Consumable
whiskey - Consumable
sandwich - Consumable
twerks_candy - Consumable
snikkel_candy - Consumable
tosti - Consumable
water_bottle - Consumable
coffee - Consumable
kurkakola - Consumable
joint - Drug
cokebaggy - Drug
crack_baggy - Drug
xtcbaggy - Drug
oxy - Drug
meth - Drug
armor - Gives armor on use
heavyarmor - Gives armor on use
binoculars - Useable binoculars to look far distances
parachute - adds a parachute to the player allowing to deploy it in the air
firework1 - Make things go boom
firework2 - More fireworks
firework3 - So many fireworks
firework4 - Looks nice
lockpick - The item used to trigger https://github.com/qbcore-framework/qb-docs/blob/main/qbcore-resources/broken-reference/README.md
advancedlockpick - Another item used to trigger https://github.com/qbcore-framework/qb-docs/blob/main/qbcore-resources/broken-reference/README.md
Commands
/resetparachute - Returns parachute back to the player
/resetarmor- Removes armor and gives heavyarmor back
Last updated
Was this helpful?
