استخدم الفنكشن هذا
function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
if
type( sEventName ) == 'string' and
isElement( pElementAttachedTo ) and
type( func ) == 'function'
then
local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
for i, v in ipairs( aAttachedFunctions ) do
if v == func then
return true
end
end
end
end
return false
end
وسوي تحقق ان الحدث ماهب مضاف وضيفه عن طريق
addEventHandler 'onClientRender'
وتحقق ان الحدث مضاف واحذفه عن طريق
removeEventHandler 'onClientRender'