🚶Player
Ready
--## Used instead of playerLoaded events
Citizen.CreateThread(function()
while not Core do Wait(500); end
while not Core.Player.Ready() do Wait(500); end
print('Hello World')
--## This print will execute when the player has gotten past the multi-char and is in-game
end)
Job
local myJob = Core.Player.Job()
--[[
returns;
{
name = "job_name",
label = "Job Label",
rank = 2,
rankL = "Rank Label",
duty = true,
isBoss = false,
isCop = true,
}
]]
Identifier
local characterID = Core.Player.Identifier()
--## Returns characterID dependant on framework e.g QBCore - CitizenID | ESX - CharID
Gang
local gangName = Core.Player.Gang()
--## Will simply return gang_name if using qb-core. May add rcore_gangs support
IsCop
local isCop = Core.Player.IsCop()
--## Returns true if player is a cop
GetJob
local myJob = Core.Player.GetJob()
--## Will return the same as Core.Player.Job() but will make sure table is up to date by gathering the job
Job Change Event
AddEventHandler("Dirk-Core:JobChange", function(job)
--## job; is the same return as GetJob() and Job() this event will run if the framework fires the job change event
end)
PlayAnim
Core.Player.PlayAnim({
ent = entity,
dict = "anim_dict",
anim = "anim_name",
freeze = true,
time = 10000,
})
--## This will load the anim dict for you
Last updated