๐ŸŽฎClient Event Reference

Learn about and how to use common core client events!

QBCore:Client:OnPlayerLoaded

  • Handles the player loading in after character selection

RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
    print('Im a client and i just loaded into your server!')
end)

QBCore:Client:OnPlayerUnload

  • Handles the player login out to character selection

RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
    print('Im a client and i just logged out of your server!')
end)

QBCore:Client:PvpHasToggled

On player load this event checks is triggered after checking the qb-core config to see if PVP should be enabled or disabled

RegisterNetEvent('QBCore:Client:PvpHasToggled', function(pvp_state)
    print('PVP mode has been set to '..pvp_state..'!')
end)

QBCore:Command:SpawnVehicle

Arguments
Type
Required
Default

vehicle model

string

yes

none

Client example

Server example

QBCore:Command:DeleteVehicle

Arguments
Type
Required
Default

none

none

no

none

Client example

Server example

QBCore:Player:SetPlayerData

QBCore:Notify

Arguments
Type
Required
Default

message

string | table

yes

'Placeholder'

type

string

yes

'primary'

length

number

yes

5000

Client example

Server example

QBCore:Client:UseItem

Arguments
Type
Required
Default

item name

string

yes

none

Client example (must have the item in your inventory)

Server example (must have the item in your inventory)

QBCore:Command:ShowMe3D

Arguments
Type
Required
Default

player id

number

yes

none

message

string

yes

none

Client example

Server example

QBCore:Client:UpdateObject

Last updated