Player Getters
GetSource
Get the server ID of a player by their identifier.Player identifier type:
'steam', 'license', 'license2', 'xbl', 'ip', 'discord', or 'live'Server ID of the player with the matching identifier, or
0 if no player foundGetPlayer
Get a player object by their source or identifier.Server ID or identifier string of the player
Player object containing all player data and functions
GetPlayerByCitizenId
Get a player object by their citizen ID.The citizen ID of the player
Player object if found, otherwise
nilGetPlayerByPhone
Get a player object by their phone number.The phone number to search for
Player object if found, otherwise
nilGetQBPlayers
Get all online players as a table of Player objects.Table indexed by source containing all online Player objects
Duty Functions
GetDutyCountJob
Get the count and sources of all on-duty players for a specific job.Job name to check
Number of on-duty players
Array of player sources who are on duty
GetDutyCountType
Get the count and sources of all on-duty players for a specific job type.Job type to check (e.g., ‘leo’, ‘ems’)
Number of on-duty players of that type
Array of player sources who are on duty
Routing Buckets
SetPlayerBucket
Set a player’s routing bucket.Player server ID
Bucket ID to set
true if bucket was set successfully, false otherwiseGetPlayersInBucket
Get all players in a specific routing bucket.Bucket ID to check
Array of player sources in the bucket, or
false if bucket is emptyUseable Items
CreateUseableItem
Register a useable item with a callback function.Item name
Callback function with parameters
(source, item)CanUseItem
Check if an item is registered as useable.Item name to check
The registered callback function if useable, otherwise
nilPermission Functions
IsWhitelisted
Check if a player is whitelisted on the server.Player server ID
true if player is whitelisted or whitelist is disabled, false otherwiseIsOptin
Check if an admin has opted into receiving admin reports.Player server ID
true if opted in or opt-in not required, false otherwiseToggleOptin
Toggle an admin’s opt-in status for admin reports.Player server ID
Ban Functions
IsPlayerBanned
Check if a player is banned from the server.Player server ID
true if player is banned, false otherwiseBan message to display to the player if banned
ExploitBan
Ban a player permanently for exploiting.Player server ID to ban
Reason/origin of the exploit ban
Notification
Notify
Send a notification to a player.Player server ID
Notification text or table with
text and captionType:
'success', 'error', 'info', 'warning'Duration in milliseconds
Group Functions
HasGroup
Check if a player has a specific job or gang.Player server ID
Job/gang name, array of names, or table with name and minimum grade
true if player has the specified group, false otherwiseGetGroups
Get all groups (jobs and gangs) a player belongs to.Player server ID
Table of group names to grade levels
Vehicle Functions
DeleteVehicle
Disable persistence and delete a vehicle entity.Vehicle entity handle
Utility Functions
GetCoreVersion
Get the current version of qbx_core.Name of the resource calling this function
Version string from resource manifest