I thought this was part of your code. If this is the full code then you need to use it with onPlayerLogin.
function hitdbs(old, new)
local accName = getAccountName(new)
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "DL1" )) then
setElementData (source, "CSThit", "DL1")
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "DL2" )) then
setElementData (source, "CSThit", "DL2")
elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "DL3" )) then
setElementData (source, "CSThit", "DL3")
else
setElementData (source, "CSThit", "None")
end
end
addEventHandler('onPlayerLogin', root, hitdbs)