Skip to main content

triggerEvent

xPlayer.triggerEvent(eventName, ...)

This function triggers an client event for the player.

Arguments

ArgumentData TypeOptionalDefault ValueExplanation
eventNamestringNo-Event name
...anyYes-Variable number of arguments

Example

ESX.RegisterCommand("noclip", 'admin', function(xPlayer) -- register a coammnd
xPlayer.triggerEvent('esx:noclip') -- Triggers The client event for the Source Player
end, false)