Thanks man, however i did this way:
function vae(f, cid)
return (
function(...)
if isCreature(cid) then
return f(...)
end
end
)
end
So it does not depend that the used functions uses cid as first argument.
addEvent(vae(doCreatureSay, cid),5000,cid,'hail',1)