diff --git a/[core]/es_extended/shared/functions.lua b/[core]/es_extended/shared/functions.lua index fc342bce..1a5d0090 100644 --- a/[core]/es_extended/shared/functions.lua +++ b/[core]/es_extended/shared/functions.lua @@ -164,3 +164,10 @@ function ESX.AssertType(...) return matches end + +---@param val unknown +function ESX.IsFunctionReference(val) + local typeVal = type(val) + + return typeVal == "function" or (typeVal == "table" and type(getmetatable(val)?.__call) == "function") +end \ No newline at end of file