TempBanPlayer(...) not working?

Basically by writing your own. wait for the playerConnecting event and do some checks if the user is banned. On the server side you would keep track of the banned players (i.e. via files or via database).

AddEventHandler('playerConnecting', function(name, setReason)
    if IsBanned(name) then
        setReason("You have been banned from this server (reason:" .. GetBanReason(name) .. ")")
        CancelEvent()
    end
end)

The IsBanned and GetBanReason are made up function names, but you get the gist how this would work (hopefully)