🌐
TPZ-CORE DOCUMENTATION
  • Introduction
  • CLIENT
    • Events
    • Functions
    • Callbacks
    • Inventory
  • SERVER
    • Functions
    • Player
    • Callbacks
    • Inventory
Powered by GitBook
On this page
  1. CLIENT

Callbacks

This is an example of how to call a callback from server side (The following example also exists in the Core and can be used).

-- @param data.source
-- @param data.loaded
-- @param data.identifier
-- @param data.charIdentifier
-- @param data.money
-- @param data.gold
-- @param data.blackmoney
-- @param data.firstname
-- @param data.lastname
-- @param data.gender
-- @param data.dob
-- @param data.job
-- @param data.jobGrade
-- @param data.identityId

-- Keep in mind, the following data will be valid ONLY if the character has been selected.
TriggerEvent("tpz_core:ExecuteServerCallBack", "tpz_core:getPlayerData", function(data)

   -- If player is in session we return the rest of the code.
   if data == nil then
      return
   end
   
   print(data.firstname .. " " .. data.lastname)
end)
PreviousFunctionsNextInventory

Last updated 3 months ago