githubEdit

Commands

A list of all the commands and their respective resource

QBCore.Commands.Add

This function allows you to register a command with a specified user level

QBCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
  • name: string

  • help: string

  • arguments: table

  • argsrequired: boolean

  • callback: function

  • permission: string

Example:

local arguments = {
    { name = 'arg 1', help = 'This will give helpful hints on what arg is for' },
    { name = 'arg 2', help = 'This will give helpful hints on what arg is for' }
}

local argsRequired = true -- if this is true the command won't work without args entered

QBCore.Commands.Add('test', 'Trigger a test command', arguments, argsRequired, function(source)
    print('Congrats, you made a test command that anyone can trigger!')
end, 'user')

QBCore.Commands.Refresh

This function will trigger a refresh of all commands suggestions. This is helpful for when setting permissions to a higher level, it will refresh the suggestions list so the player can now see the new commands they have access to!

  • source: number

Example:

AdminMenu

chevron-right/admin - opens the admin menuhashtag

Opens the admin menu

Permission level: admin

chevron-right/blips - toggles player blipshashtag

Adds a blip to the map for all players. Useful to monitor player locations.

Permission level: admin

chevron-right/names - toggles player nameshashtag

Shows player names and IDs above heads

Permission level: admin

chevron-right/coords - shows your current coordshashtag

Shows your current coordinates in vector3(x, y, z) format

Permission level: admin

chevron-right/maxmods - sets vehicle to max modshashtag

Sets the current vehicle to have maximum performance modifications

Permission level: admin

chevron-right/noclip - toggles nocliphashtag

Toggles noclip

Permission level: admin

chevron-right/admincar - adds current vehicle to garagehashtag

Saves the current vehicle to the database table player_vehicles allowing access to the vehicle in the garage

Permission level: admin

chevron-right/announce [message] - creates an announcementhashtag

Creates an announcement to be sent to all players in the chat.

Permission level: admin

  • message - (required) The message to send

chevron-right/report [message] - create a report to staffhashtag

Sends a message to staff in the chat and stores the message as a report

Permission level: user

  • message - (required) The message to send

chevron-right/reportr [message] - replies to a user reporthashtag

Replies to a user report with the given message

Permission level: admin

  • message - (required) The message to send in the reply

chevron-right/reporttoggle - opt in/out of receiving player reportshashtag

Opt in/out of receiving player reports in chat

Permission level: admin

chevron-right/staffchat [message] - sends a staff-only messagehashtag

Sends a message in chat visible only to users with the 'admin' permission level

Permission level: admin

  • message - (required) The message to send

chevron-right/warn [id] [reason] - warn a playerhashtag

Sends a message to the player with the given id with the reason given. Also, adds a warning against the player in the database table player_warns

Permission level: admin

  • id - (required) The id of the player being warned

  • reason - (required) The reason for giving a warning

chevron-right/checkwarns [id] [opt: number] - view a warning for a given playerhashtag

Checks for existing warnings against a player with the given id. If no warning number is given in the command, it will display the number of warnings the player has received. If a warning number is given in the command, it will display that warning.

Permission level: admin

  • id - (required) The id of the player being checked

  • number - (optional) The warning number (1, 2, 3, etc...)

chevron-right/delwarn [id] [number] - deletes a warning from a playerhashtag

Deletes a warning from a player and removes the database entry

Permission level: admin

  • id - (required) The id of the player

  • number - (required) The warning number to be deleted (1, 2, 3 etc...)

chevron-right/givenuifocus [id] [hasFocus] [hasCursor] - Sets nuifocus state for playerhashtag

This command sets the NUI focus state for a player with the given id. This allows you to manually set the following native: https://docs.fivem.net/natives/?_0x5B98AE30arrow-up-right Useful if a player is stuck in an NUI overlay.

Permission level: admin

  • id - (required) The id of the player

  • hasFocus - (required) [true/false] Whether the NUI has focus or not

  • hasCursor - (required) [true/false] Whether the player has cursor when using NUI

chevron-right/setmodel [model] [id] - changes the players ped modelhashtag

Changes the ped model of the player with the given id.

Permission level: admin

  • model - (required) The ped model to change to

  • id - (required) The id of the player whos ped model is being changed

chevron-right/setspeed [opt: speed] - sets players foot speedhashtag

Sets your foot speed between default and "fast"

Permission level: admin

  • speed - (optional) ["fast"] will set foot speed to "fast". If this argument is left blank it will set foot speed to "normal"

chevron-right/kickall - kick all players from serverhashtag

Kicks all players from the server.

Permission level: god

chevron-right/setammo [amount] [opt: weapon] - set weapon ammohashtag

Sets the ammo amount for current gun in hand or weapon if given

Permission level: admin

  • amount - (required) The amount of ammo to set

  • weapon - (optional) The weapon to set the ammo for. Will set ammo for current gun in hand if left blank

chevron-right/vector2 - Copies vector2 to clipboardhashtag

Copies vector2(x, y) to clipboard of your current coordinates.

Permission level: admin

chevron-right/vector3 - Copies vector3 to clipboardhashtag

Copies vector3(x, y, z) to clipboard of your current coordinates

Permission level: admin

chevron-right/vector4 - Copies vector4 to clipboardhashtag

Copies vector4(x, y, z, w) to clipboard of your current coordinates

Permission level: admin

chevron-right/heading - Copies headinghashtag

Copies heading w to clipboard of your current heading (the direction you are facing)

Permission level: admin

Core

chevron-right/tp [id / x] [opt: y] [opt: z]- teleport to player or locationhashtag

Teleports you to either a player with the given id or to a given x, y, z location

Permission level: admin

  • id or x - (required) The player id or x coordinate

  • y - (optional) The y coordinate (required if using x for the first argument)

  • z - (optional) The z coordinate (required if using x for the first argument)

chevron-right/tpm - teleport to a marked locationhashtag

Teleports you to the marked location on the map.

Permission level: admin

chevron-right/togglepvp - toggle PVP on serverhashtag

Toggles Player vs Player mode on the server

Permission level: admin

chevron-right/addpermission [id] [permission] - gives a player a permissionhashtag

Gives a player with the given id the given permission level. The player must be online.

Permission level: god

chevron-right/removepermission [id] [permission] - removes a player permissionhashtag

Removes the given permission from the player with the given id. The player must be online.

Permission level: god

chevron-right/openserver - open the server for everyonehashtag

Opens the server allowing everyone to join.

Permission level: admin

chevron-right/closeserver [reason] - close the server for people without permissionhashtag

Closes the server for people without the correct permission. Kicks any players currently online without the required permission giving the reason in the kick message.

Permission level: admin

chevron-right/car [model] - spawns a vehiclehashtag

Spawns a vehicle of the given model type.

Permission level: admin

chevron-right/dv - delete vehiclehashtag

Deletes the vehicle you are sitting in or deletes all vehicles within 5.0 units of your position.

Permission level: admin

chevron-right/givemoney [id] [type] [amount] - give money to a playerhashtag

Gives money to a player

Permission level: admin

  • id - (required) The id of the player

  • type - (required) The money type [cash, bank etc...]

  • amount - (required) The amount to give

chevron-right/setmoney [id] [type] [amount] - set the amount of money a player hashashtag

Sets the amount of money a player has.

Permission level: admin

  • id - (required) The id of the player

  • type - (required) The money type [cash, bank etc...]

  • amount - (required) The amount to set

chevron-right/job - display your current jobhashtag

Displays your current job name and grade

Permission level: user

chevron-right/setjob [id] [job] [grade] - sets a players jobhashtag

Sets a player with the given id to have the given job with the given grade

Permission level: admin

  • id - (required) The id of the player

  • job - (required) The job name

  • grade - (required) The job grade

chevron-right/gang - display your current ganghashtag

Displays your current gang name and grade

Permission level: user

chevron-right/setgang [id] [gang] [grade] - sets a players ganghashtag

Sets a player with the given id to be part of the given gang with the given grade

Permission level: admin

  • id - (required) The id of the player

  • gang - (required) The gang name

  • grade (required) The gang grade

chevron-right/clearinv [opt: id]- clears a players inventoryhashtag

Clears the inventory of a player with the given id or your own inventory if no id is given

Permission level: admin

  • id - (optional) The id of a player

chevron-right/ooc [message] - ooc chat commandhashtag

Sends an out-of-character (ooc) message to the chat.

Permission level: user

  • message - (required) The message to send

chevron-right/me [message] - shows a message above your headhashtag

Shows a 3d text message above your head. Useful for enhancing roleplay.

Permission level: user

  • message - (required) The message to display

Ambulancejob

chevron-right/911e [message] - sends a message to EMShashtag

Sends a message to EMS players with the job 'ambulance'.

Permission level: user

  • message - (required) The message to send

chevron-right/status - check the status of the nearest playerhashtag

This will find the closest player and check their health status

Permission level: user

chevron-right/heal - heals the nearest playerhashtag

This will find the nearest player and heal them

Permission level: user

chevron-right/revivep - revives the nearest playerhashtag

This will find the nearest player and revive them

Permission level: user

chevron-right/revive - revive yourselfhashtag

Revives yourself to full health

Permission level: admin

chevron-right/setpain [opt: id] - sets the pain level to the playerhashtag

Sets the pain level to the player with the given id or to yourself if no id is given.

Permission level: admin

chevron-right/kill [opt: id] - kills the playerhashtag

Kills the player with the given id or kills yourself if no id is given.

Permission level: admin

  • id - (optional) The player id

chevron-right/aheal [opt: id] - heals a playerhashtag

Heals a player with the given id or heals yourself if no id is given.

Permission level: admin

  • id - (optional) The player id

Police

chevron-right/911p [message] - sends an alert to the policehashtag

This command sends an alert to all players with the job 'police'. The alert will contain the given message and a blip is added to the police player's map at your current location.

Permission level: user

  • message - (required) The message to send with the alert

chevron-right/spikestrip - Place a spike striphashtag

Places a Spike Strip object on the ground. The player must have the job of 'police' and be on duty to use.

Permission level: user

chevron-right/grantlicense [id] [license] - give a player a licensehashtag

Gives a player with the given id the license of the given license type.

This command can only be used by players with the job of 'police' above the minimum grade as set by Config.LicenseRank (Default is grade 2 and above).

Permission level: user

  • id - (required) The id of the player

  • license - (required) The license type (E.g. "weapon" or "driver")

chevron-right/revokelicense [id] [license] - remove a player's licensehashtag

Removes a license of the given license type from a player with the given id.

This command can only be used by players with the job of 'police' above the minimum grade as set by Config.LicenseRank (Default is grade 2 and above).

Permission level: user

  • id - (required) The id of the player

  • license - (required) The license type (E.g. "weapon" or "driver")

chevron-right/pobject [type] - allows officer to spawn an objecthashtag

Allows a player with the job of 'police' to spawn an object

Permission level: user

  • type - (required) The object type. Available types:

    • cone - a traffic cone

    • barrier - a roadblock barrier

    • roadsign - a road sign

    • tent - a gazebo for crime scenes

    • light - a work light

    • delete - delete an object

chevron-right/cuff - cuff the nearest playerhashtag

This command will hard cuff the nearest player (prevents movement) .

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/sc - soft cuff the nearest playerhashtag

This command will soft cuff the nearest player (allows movement).

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/escort - escort the nearest playerhashtag

This command will escort the nearest player.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/callsign [name] - allows officer to set a callsignhashtag

Allows a player with the job of 'police' to set their callsign. The callsign is visible as the name of the player's blip on the map.

Permission level: user

  • name - (required) the callsign to be used

chevron-right/jail - sends nearest player to jailhashtag

This command will send the nearest player to jail. A menu will open allowing the officer to set the jail time.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/unjail [id] - unjail a playerhashtag

Unjail a player with the given id

Can only be used by players with the job of 'police'

Permission level: user

  • id - (required) the id of the player

chevron-right/clearcasings - clears bullet casings in the areahashtag

Clears any bullet casings with 10.0 units of your current location.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/clearblood - clears blood drops in the areahashtag

Clears any blood drops with 10.0 units of your current location.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/seizecash - seize cash from the nearest playerhashtag

Seize cash from the nearest player.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/cam [id] - allows officer to see cam footage from selected spotshashtag

Allows a player with the job of 'police' to view security cameras. Security camera locations can be set up in the config file of qb-policejob. See Config.SecurityCameras.

Permission level: user

  • id - (required) the id of the camera

chevron-right/flagplate [plate] [reason] - allows speed cameras to find a plate flaggedhashtag

Allows speed cameras that can be set up in the config to find a flagged plate. See Config.Radars

Permission level: user

  • plate - (required) the plate to be flagged

  • reason - (required) the reason for the flag

chevron-right/unflagplate [plate] - removes the flag from the platehashtag

Removes the flag on the plate so cameras will no longer pick up the plate.

Permission level: user

  • plate - (required) the plate to be unflagged

chevron-right/plateinfo [plate] - shows the info of the platehashtag

Shows whether a plate is flagged and gives the reason if so.

Permission level: user

  • plate - (required) the plate to check

chevron-right/depot [price] - allows officer to impound vehicle for a pricehashtag

Allows a player with the job of 'police' to send a vehicle to the impound for the given price

Permission level: user

  • price - (required) the price set for removing vehicle from depot

chevron-right/impound - impounds a vehicle without a pricehashtag

impounds a vehicle without a price

Can only be used by a player with the job of 'police'

Permission level: user

chevron-right/paytow [id] - pays the tow driver $500hashtag

Pays the player with the given id $500. The player being paid must have the job of 'tow'.

Permission level: user

  • id - (required) the id of the player being paid

chevron-right/paylawyer [id] - pays a lawyer $500hashtag

Pays the player with the given id $500. The player being paid must have the job of 'lawyer'.

Permission level: user

  • id - (required) the id of the player being paid

chevron-right/anklet - adds a tracking device to the closest playerhashtag

Adds a tracking device to the closest player.

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/ankletlocation [cid] - shows the location of the playerhashtag

Shows the location of the player with the given cid

Can only be used by players with the job of 'police'

Permission level: user

  • cid - (required) the citizen id of the player being checked

chevron-right/takedrivinglicense - takes the players drivers licensehashtag

Takes the driving license of the closest player

Can only be used by players with the job of 'police'

Permission level: user

chevron-right/takedna [id] - takes the players dnahashtag

Takes the dna of a player with a given id. Requires an empty evidence bag.

Permission level: user

  • id - (required) the id of the player

Banking

  • /givecash - gives the player an amount of cash

Cityhall

  • /drivinglicense - give player a license after a driving test

Binds

  • /binds - allows you to set customs key binds

Diving

  • /divingsuit - uses the diving suit

Doorlock

  • /newdoor - opens UI for creating new door

  • /doordebug - debug for doorlocks

Drugs

  • /newdealer - creats a new dealer at a location (front door of house)

  • /deletedealer - deales a saved dealer

  • /dealers - show list if info on dealers

  • /dealergoto - teleport to dealer

Garbage

  • /cleargarbroutes - removes garbo routes for user

Hotdogjob

  • /removestand - removes a hotdog stand

Housing

  • /decorate - opens decorate menu/options

  • /createhouse - creates a house at location

  • /addgarage - adds garage at location

  • /ring - rings a doorbell at location

Hud

  • /cash - displays current cash amount

  • /bank - displays current bank amount

  • /dev - displays a dev icon

Inventory

  • /resetinv - resets inventory on stash/trunk/glovebox

  • /rob - robs closest player

  • /giveitem - gives item to a player

  • /randomitems - gives random items to a player

Lapraces

  • /cancelrace - cancel the current race

  • /togglesetup - turn on or off race setup

Mechanicjob

  • /setvehiclestatus - sets the vehicles status

  • /setmechanic - give someone the mechanic job

  • /firemechanic - fire a mechanic

Multicharacter

  • /logout - logout of current character

  • /closeNUI - closes the multicharacter NUI

Newsjob

  • /newscam - gives player a a news camra

  • /newsmic - gives player a news microphone

  • /newsbmic - gives player a boom microphone

Phone

  • /setmetadata - sets the players metadata

  • /bill - sends a bill* /invoice to player

RadialMenu

  • /getintrunk - Gets in the trunk

  • /putintrunk - puts a player in the trunk (kidnap)

Smallresources

  • /resetarmor - resets the armor

  • /resetparachute - resets a parachute

  • /testwebhook - test to see if webhook for logs is working

  • /id - displays your id

Streetrace

  • /createrace - starts a street race

  • /stoprace - stops current street race

  • /quitrace - quits the current street race

  • /startrace - starts the current street race

Towjob

  • /npc - Toggles a tow job from a npc

  • /tow - puts closes vehicle on flatbed (must be behind truck)

Traphouse

  • /multikeys - gives keys to another player

Vehiclefailure

  • /fix - fixes current vehicle

Vehiclekeys

  • /engine - toggles engine on/off

  • /givekeys - gives keys to a player

  • /addkeys - adds keys to that player

  • /removekeys - removes keys from player

Vehicleshop

  • /transferVehicle - gift or sell your vehicle to someone

Weapons

  • /repairweapon - repairs a weapon

Last updated

Was this helpful?