Functions
This is the way of getting the Core API Functions (Client Side)
local TPZ = exports.tpz_core:getCoreAPI()
API Functions (Client Side)
Player & Entity Ped API Functions
Get Player Client Data
-- @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
local data = TPZ.GetPlayerClientData()
-- If player is in session we return the rest of the code.
if data == nil then
return
end
print(data.firstname .. " " .. data.lastname)
Display Progress Bars
TPZ.DisplayProgressBar(cooldown, text) -- client side only
Send an announcement to the player ped.
-- @param title : The title to be displayed on the server announcement.
-- @param description : The description to be displayed on the server announcement.
-- @param duration : The time for the notification to be displayed (in milliseconds)
-- @param title_rgba : The rgba or color hash in a string (text) to change the title font color.
-- @param title_description_rgba : The rgba or color hash in a string (text) to change the description font color.
TPZ.SendAnnouncement(title, description, duration, title_rgba, title_description_rgba) -- client side only
Teleport Player to coordinates.
TPZ.TeleportToCoords(x, y, z, heading) -- client side only
Teleport Ped to coordinates.
TPZ.TeleportPedToCoords(entity, x, y, z, heading) -- client side only
Get closest peds nearby the target ped id.
-- @param entityPed : The required ped id (such as PlayerPedId() ).
-- @param distance : The distance to check for the closest peds based on the @entityPed coordinates.
-- returns table.
local closestPeds = TPZ.GetClosestPedsNearbyTargetPed(entityPed, distance)
-- The specified table returns:
-- @entity - The entity id.
-- @pedType - The entity ped type.
-- distance - How close the entity is to the @entityPed target.
-- isDead - If the entity is dead or not.
Get closest players within distance.
-- @param distance : The distance to check for the closest players.
-- returns table.
local closestPeds = TPZ.GetNearestPlayers(distance)
-- The specified table returns:
-- @entity - The player id.
Notifications
TPZ.NotifyLeft(firsttext, secondtext, dict, icon, duration, color) -- client side to client side
TPZ.NotifyTip(text, duration) -- client side to client side
TPZ.NotifyTop(text, location, duration) -- client side to client side
TPZ.NotifyRightTip(text, duration) -- client side to client side
TPZ.NotifyObjective(text, duration) -- client side to client side
TPZ.NotifySimpleTop(title, subtitle, duration) -- client side to client side
TPZ.NotifyAvanced(text, dict, icon, text_color, duration, quality) -- client side to client side
TPZ.NotifyBasicTop(text, duration) -- client side to client side
TPZ.NotifyCenter(text, duration) -- client side to client side
TPZ.NotifyBottomRight(text, duration) -- client side to client side
TPZ.NotifyFail(title, subtitle, duration) -- client side to client side
TPZ.NotifyDead(title, audioRef, audioName, duration) -- client side to client side
TPZ.NotifyUpdate(utitle, umsg, duration) -- client side to client side
TPZ.NotifyWarning(title, msg, audioRef, audioName, duration) -- client side to client side
TPZ.NotifyLeftRank(title, subtitle, dict, icon, duration, color) -- client side to client side
Last updated