Events
All the Client Events related to the players and notifications.
Player Related
Loaded Player (The following Event is triggered after selecting a character and getting spawned)
-- @param newChar : returns integer value (0 = false, 1 = true)
RegisterNetEvent("tpz_core:isPlayerReady")
AddEventHandler("tpz_core:isPlayerReady", function(newChar)
-- do action
end)
The following Event is triggered after a player has been re-spawned (not revived).
RegisterNetEvent("tpz_core:isPlayerRespawned")
AddEventHandler("tpz_core:isPlayerRespawned", function()
-- do action
end)
Get Player Job (The following Event is triggered when the job has been updated)
-- @param job
-- @param jobGrade
RegisterNetEvent("tpz_core:getPlayerJob")
AddEventHandler("tpz_core:getPlayerJob", function(data)
-- do action
end)
Get Player Group (The following event is triggered when the group has been updated)
-- @param group - returns the current group
RegisterNetEvent("tpz_core:getPlayerGroup")
AddEventHandler("tpz_core:getPlayerGroup", function(group)
-- do action
end)
Teleport the player to the selected coords.
TriggerEvent("tpz_core:teleportToCoords", x, y, z, heading)
Notifications
TriggerEvent('tpz_core:sendLeftNotification', firsttext, secondtext, dict, icon, duration, color)
TriggerEvent('tpz_core:sendTipNotification', text, duration)
TriggerEvent('tpz_core:sendTopNotification', text, location, duration)
TriggerEvent('tpz_core:sendRightTipNotification', text, duration)
TriggerEvent('tpz_core:sendBottomTipNotification', text, duration)
TriggerEvent('tpz_core:sendSimpleTopNotification', title, subtitle, duration)
TriggerEvent('tpz_core:sendAdvancedRightNotification', text, dict, icon, text_color, duration, quality)
TriggerEvent('tpz_core:sendBasicTopNotification', text, duration)
TriggerEvent('tpz_core:sendSimpleCenterNotification', text, duration)
TriggerEvent('tpz_core:sendBottomRightNotification', text, duration)
TriggerEvent('tpz_core:sendFailMissionNotification', title, subtitle, duration)
TriggerEvent('tpz_core:sendDeadPlayerNotification', title, audioRef, audioName, duration)
TriggerEvent('tpz_core:sendMissionUpdateNotification', utitle, umsg, duration)
TriggerEvent('tpz_core:sendWarningNotification', title, msg, audioRef, audioName, duration)
TriggerEvent('tpz_core:sendLeftRankNotification', source, title, subtitle, dict, icon, duration, color)
Announcements
-- @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.
TriggerEvent('tpz_core:sendAnnouncement', title, description, duration, title_rgba, title_description_rgba)
Last updated